Skip to content

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

Closed

Description

@itg-assistant

Gunter asked 2016-11-07 15:47:00 UTC

Hi

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

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    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

  2. added
    BugSomething is broken or behaving unexpectedly.
    on Jun 12, 2026
  3. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    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

  4. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken or behaving unexpectedly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions