.net scrollbar autoscroll problem

前端 未结 5 991
自闭症患者
自闭症患者 2021-01-18 01:42

I\'m writing an app in .net that uses the autoscroll for a layout panel in a dialog. It seems that whenever I resize the window so that the vertical scrollbars should appear

5条回答
  •  迷失自我
    2021-01-18 02:03

    I haven't noticed exactly the behavior you describe, but have run into situations where the appearance of the vertical scrollbar makes a horizontal scrollbar necessary.

    You could set the contents of the panel to allow for the width of the scrollbar, for example if I have a ListBox in a Panel:

    listBox1.Width = panel2.Width - System.Windows.Forms.SystemInformation.VerticalScrollBarWidth;
    

    HTH

提交回复
热议问题