Hi
When I place a datagridview with ScrollBars = ScrollBars.Bothis set inside a flowlayoutpanel, no scrollbars are shown,
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
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
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