FlowLayout Panel and user controls

Answered
0
0

Hi,

Testing the WiseJ hybrid example.

Why is it that my user controls will not appear when added to a flowlayout panel unless I set the control’s AutoSize property to True ?

If I do that the designer automatically makes my user control only 400 pixels wide – but I need the user control to be much wider.

If I set the AutoSize property to false – stretch the control to 800 wide – then set AutoSize to false – it automatically shrinks the control to 400 again.

If I do not set AutoSize to true – my user controls do not show up at all when added to the FlowLayout Panel.

Is this some limitation of the Hybrid Application’s template ?

  • edmond girardi
    I think I figured this out – I was setting the Dock property to FILL when adding the user controls to the flow layout panel via code: When i commented out the fill setting the user control showed up in the layout. I also was able to set the AutoSize of my usercontrol to False. ucAreaMenuTile lo_Tile = new ucAreaMenuTile(); lo_Tile.Dock = DockStyle.Fill; <—- Did not like this
  • You must to post comments
Best Answer
0
0

Hi Edmond,

We always recommend that you use the FillWeight property instead of setting the Dock to Fill.

Best Regards,
Alaa

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.