When I place a datagridview with ScrollBars = ScrollBars.Bothis set inside a flowlayoutpanel

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi

When I place a datagridview with ScrollBars = ScrollBars.Bothis set inside a flowlayoutpanel, no scrollbars are shown,

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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

 

 

  • You must to post comments
Showing 3 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json