Exemplo n.º 1
0
        private void ResizeLastColumn(DevExpress.XtraGrid.Views.Grid.GridView view)
        {
            DevExpress.XtraEditors.VScrollBar vScrollBar = view.GridControl.Controls.OfType <DevExpress.XtraEditors.VScrollBar>().FirstOrDefault();
            int nWidth = view.GridControl.ClientSize.Width - view.FixedLineWidth * view.Columns.Count - vScrollBar.Width;

            foreach (DevExpress.XtraGrid.Columns.GridColumn column in view.Columns)
            {
                if (view.Columns.Count - 1 > view.Columns.IndexOf(column))
                {
                    nWidth = nWidth - column.Width;
                }
                else
                {
                    column.Width = (int)(nWidth);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.pnlBorder      = new DevExpress.XtraEditors.PanelControl();
     this.hScroll        = new DevExpress.XtraEditors.HScrollBar();
     this.vScroll        = new DevExpress.XtraEditors.VScrollBar();
     this.lblCornerCover = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.pnlBorder)).BeginInit();
     this.pnlBorder.SuspendLayout();
     this.SuspendLayout();
     //
     // pnlBorder
     //
     this.pnlBorder.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.pnlBorder.Controls.Add(this.lblCornerCover);
     this.pnlBorder.Controls.Add(this.hScroll);
     this.pnlBorder.Controls.Add(this.vScroll);
     this.pnlBorder.Location = new System.Drawing.Point(0, 0);
     this.pnlBorder.Name     = "pnlBorder";
     this.pnlBorder.Size     = new System.Drawing.Size(728, 104);
     this.pnlBorder.TabIndex = 0;
     //
     // hScroll
     //
     this.hScroll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                 | System.Windows.Forms.AnchorStyles.Right)));
     this.hScroll.Location = new System.Drawing.Point(2, 86);
     this.hScroll.Name     = "hScroll";
     this.hScroll.Size     = new System.Drawing.Size(724, 16);
     this.hScroll.TabIndex = 3;
     this.hScroll.Visible  = false;
     this.hScroll.Scroll  += new System.Windows.Forms.ScrollEventHandler(this.hScroll_Scroll);
     //
     // vScroll
     //
     this.vScroll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Right)));
     this.vScroll.Location = new System.Drawing.Point(710, 2);
     this.vScroll.Name     = "vScroll";
     this.vScroll.Size     = new System.Drawing.Size(16, 100);
     this.vScroll.TabIndex = 2;
     this.vScroll.Visible  = false;
     this.vScroll.Scroll  += new System.Windows.Forms.ScrollEventHandler(this.vScroll_Scroll);
     //
     // lblCornerCover
     //
     this.lblCornerCover.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.lblCornerCover.BackColor = System.Drawing.Color.Transparent;
     this.lblCornerCover.Location  = new System.Drawing.Point(710, 86);
     this.lblCornerCover.Name      = "lblCornerCover";
     this.lblCornerCover.Size      = new System.Drawing.Size(16, 16);
     this.lblCornerCover.TabIndex  = 4;
     this.lblCornerCover.Visible   = false;
     //
     // LnFListViewControl
     //
     this.Controls.Add(this.pnlBorder);
     this.Name = "LnFListViewControl";
     this.Size = new System.Drawing.Size(728, 104);
     ((System.ComponentModel.ISupportInitialize)(this.pnlBorder)).EndInit();
     this.pnlBorder.ResumeLayout(false);
     this.ResumeLayout(false);
 }