[RESOLVED] Panel Autoscroll will not show vertical scroll bar
Ok. I have a panel with a TableLayoutPanel enclosed in it. I am loading several command buttons into it (one in each grid box). I have the panel set to autoscroll. When TableLayoutPanel is set to AddColumns, all works well. However, I dont want horizontal scroll, I want vertical. When I set TableLayoutPanel to AddRows, a vertical scrollbar will not appear. I have searched everywhere and cannot find a solution. Any ideas?
Re: Panel Autoscroll will not show vertical scroll bar
Does your content's size actually merit a vertical scroll bar? How are the row styles set, i.e. AutoSize, Absolute, or Percent?
Re: Panel Autoscroll will not show vertical scroll bar
The RowSize and ColumnSize are Absolute. 50 and 100 respectively. There are 8 rows and 5 columns. For a total of 40 items under normal load. However, I load 80 items exactly in this example. Autosize is on and the TableLayoutPanel has its grow mode to AddRows.. It is well warranted I believe.
Re: Panel Autoscroll will not show vertical scroll bar
SOLUTON FOUND:
[code]
Dim intWidth As Integer
Dim intHeight As Integer
intHeight = TableLayoutPanel.Height
intWidth = TableLayoutPanel.Width
TableLayoutPanel.Dock = Top
TableLayoutPanel.Autosize = True
Panel.MaximumSize.Width = intWidth
Panel.MaximumSize.Height = intHeight
Panel.AutoScroll = True
[Code]
Of course all this can be set from the designer, but using code was good practice. :)
Re: Panel Autoscroll will not show vertical scroll bar
SOLUTON FOUND:
Code:
Dim intWidth As Integer
Dim intHeight As Integer
intHeight = TableLayoutPanel.Height
intWidth = TableLayoutPanel.Width
TableLayoutPanel.Dock = Top
TableLayoutPanel.Autosize = True
Panel.MaximumSize.Width = intWidth
Panel.MaximumSize.Height = intHeight
Panel.AutoScroll = True
Of course all this can be set from the designer, but using code was good practice. :)