user1884032
user1884032

Reputation: 347

How to enable scrollbar even though the controls inside are disabled

I have a form and inside the form I have an UltraExpandableGroupBoxPanel which holds some controls. Eg:

Me.UltraExpandableGroupBoxPanel.AutoScroll = True
Me.UltraExpandableGroupBoxPanel.Controls.Add(Me.ctlCars)
Me.UltraExpandableGroupBoxPanel.Controls.Add(Me.ctlPlanes)
Me.UltraExpandableGroupBoxPanel.Dock = System.Windows.Forms.DockStyle.Fill
Me.UltraExpandableGroupBoxPanel.Name = "UltraExpandableGroupBoxPanel"
Me.UltraExpandableGroupBoxPanel.Size = New System.Drawing.Size(500, 1000)

The AutoScroll property is set to True so it can show the scrollbar. When the two controls are disabled, the scrollbar is also disabled and I cannot move the scrollbar to view the information from the bottom on the form. Is there a way to enable the scrollbar even though the controls are disabled?

Upvotes: 1

Views: 825

Answers (1)

keerti
keerti

Reputation: 465

Instead of making control disabled, try by making it read only and display control in grey color so that it looks similar to disabled mode.

Upvotes: 2

Related Questions