You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When I place a datagridview with ScrollBars = ScrollBars.Bothis set inside a flowlayoutpanel #361
Your code didn't set the size of the grid, which is larger than the panel it placed it in. Using F12 you can see that the grid is larger than the panel. The flow layout panel doesn't change the size of its children (unless you are using the FillWeight property), it simply wraps them.
If you add d1.Size = flowLayoutPanel1.Size; you'll see the scrollbars. Also you don't need to set d1.ScrollBars unless you want to suppress them, the default is to show the scroll bars.
See image below:
May I also ask you to please type the subject of the question instead of using "xx" or "xxx".
The scrollbars are displayed when AutoScroll = true. It's the same in WinForms and Wisej, I don't know about VWG, I can't run it anymore. Otherwise the controls are truncated, the flow layout panel doesn't resize the child controls unless they are anchored.
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-07 16:04:38 UTC
Hi Gunter,
Your code didn't set the size of the grid, which is larger than the panel it placed it in. Using F12 you can see that the grid is larger than the panel. The flow layout panel doesn't change the size of its children (unless you are using the FillWeight property), it simply wraps them.
If you add d1.Size = flowLayoutPanel1.Size; you'll see the scrollbars. Also you don't need to set d1.ScrollBars unless you want to suppress them, the default is to show the scroll bars.
See image below:
May I also ask you to please type the subject of the question instead of using "xx" or "xxx".
Best,
Luca
itg-assistant commentedon Jun 12, 2026
Gunter answered 2016-11-11 15:34:50 UTC
Hi Luca
ok that's the behavior of winforms, in VWG the FlowLayoutPanel shows ScrollBars, when the contained controls exceed the size of the FlowLayoutPanel
Sorry for the xx, i misend something
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-11 15:43:11 UTC
Hi Gunter,
The scrollbars are displayed when AutoScroll = true. It's the same in WinForms and Wisej, I don't know about VWG, I can't run it anymore. Otherwise the controls are truncated, the flow layout panel doesn't resize the child controls unless they are anchored.
Best,
Luca