Autostart height FlowLayoutPanel not working

I am working on a UserControl, consisting of a ComboBox group located horizontally on the top of the control in the flowlayout panel, and a datagridview directly below the flowlayout panel, which occupies all the remaining space on the control. I need to be able to easily hide all drop-down lists, so I have a SplitContainer with Orientation == Horizontal, with a flowlayout panel in SplitContainer.Panel1 and a datagridview in SplitContainer.Panel2.

The management hierarchy is as follows:

SplitContainer1
    SplitContainer1.Panel1
        FlowLayoutPanel1
            ComboBox1
            ComboBox2
            ComboBox3
    SplitContainer1.Panel2
        DataGridView1

Since the flowlayoutpan is horizontally oriented and the horizontal space is limited, the WrapContents flowlayoutpanel property is set to True, so the drop-down lists end until the next line when the control becomes too narrow to fit all the drop-down lists on the same line.

, , , flowlayoutpanel , Height . flowlayout splitcontainer . FlowLayoutPanel.Resize, SPlitContainer.SplitterDistance, , FlowLayoutPanel.Height , . . FlowLayoutPanel? FlowLayoutPanel, FlowLayoutPanel.Height ?

+3
1

, , . , , , SplitContainer. :

FlowLayoutPanel1 (Autosizse = true, Dock = Top)
  ComboBox1
  ComboBox2
  ComboBox3
DataGridView1 (Dock = Fill)

, FlowLayoutPanel1, Visible, / .

+3

Source: https://habr.com/ru/post/1726728/


All Articles