コード例 #1
0
 private void VerticalScrollBar_VisibleChanged(object sender, EventArgs e)
 {
     if (!DesignMode &&
         !VerticalScrollBar.Visible)
     {
         VerticalScrollBar.Location = new Point(ClientRectangle.Width - VerticalScrollBar.Width, 0);
         VerticalScrollBar.Size     = new Size(VerticalScrollBar.Width, ClientRectangle.Height);
         VerticalScrollBar.Show();
     }
 }
コード例 #2
0
        void VerticalScrollBar_VisibleChanged(object sender, EventArgs e)
        {
            if (!VerticalScrollBar.Visible)
            {
                VerticalScrollBar.Location = new Point(ClientRectangle.Width - VerticalScrollBar.Width, 1);
                VerticalScrollBar.Size     = new Size(VerticalScrollBar.Width, ClientRectangle.Height - 1);// - HorizontalScrollBar.Height);
                VerticalScrollBar.Show();
            }

            VerticalScrollBar.Visible = true;
        }
コード例 #3
0
        private void ShowScrollBars(object sender, EventArgs e)
        {
            if (!VerticalScrollBar.Visible)
            {
                int width = VerticalScrollBar.Width;

                VerticalScrollBar.Location =
                    new Point(ClientRectangle.Width - width - BORDERWIDTH, CAPTIONHEIGHT);

                VerticalScrollBar.Size =
                    new Size(width, ClientRectangle.Height - CAPTIONHEIGHT - BORDERWIDTH);

                VerticalScrollBar.Show();
            }
        }
コード例 #4
0
ファイル: dgvVertScroll.cs プロジェクト: ophthalmos/TimeCalc
        private void ShowScrollBars(object sender, EventArgs e)
        {
            if (!VerticalScrollBar.Visible)
            {
                int width = VerticalScrollBar.Width;
                //if (isFirst)
                //{
                //    Width -= width;
                //    isFirst = false;
                //}
                VerticalScrollBar.Location = new Point(ClientRectangle.Width - width - 1, 1);
                VerticalScrollBar.Size     = new Size(width, ClientRectangle.Height - 1);
                VerticalScrollBar.Show();
                //   AutoResizeColumns();

                //MessageBox.Show(width.ToString());
                //SuspendLayout();
                //foreach (DataGridViewColumn c in Columns)
                //{
                //    c.Width -= 4;
                //}
                //ResumeLayout();
            }
        }