Home All Groups Group Topic Archive Search About

Property 'FlowBreak' accessible only at design mode ?

Author
2 Mar 2006 1:07 PM
philip
The FlowLayoutPanel is useful for HTML-like layout.
But there is an important problem.

1.
IN DESIGN MODE, all is normal.
If you insert a Label control on a form, the FlowBreak proprety doe's not
appear in property window of the Label. It's normal.
If you drag this control on a FlowLayoutPanel (in design mode), the
FlowBreak  property appears in the property window of the Label control.
That is very good

BUT

2.
IN PROGRAMMATION MODE, something is wrong :
If I create dynamically my Label controls on the flowLayoutPanel using
something like :

Dim LabelControl as new Label
Me.FlowLayoutPanel1.Controls.Add (LabelControl)

then I CANNOT ACCESS to the FlowBreak property of the control. That is very
sad for the dynamic layout of this panel...

But someone can give me a solution ? It's important for me.

Thanks by advance

Author
2 Mar 2006 2:10 PM
Chris Dunaway
The FlowBreak property is not provided by the Label it is provided by
the FlowLayoutPanel.  If you look in the designer generated code for
the label, you will see the code necessary to set this value.  It looks
like this:

Me.flowLayoutPanel1.SetFlowBreak(Me.label1, True)
Author
2 Mar 2006 2:13 PM
philip
I kiss you.
Thank you very much.

Philipe


"Chris Dunaway" <dunaw***@gmail.com> a écrit dans le message de news:
1141308641.196325.128***@v46g2000cwv.googlegroups.com...
Show quoteHide quote
> The FlowBreak property is not provided by the Label it is provided by
> the FlowLayoutPanel.  If you look in the designer generated code for
> the label, you will see the code necessary to set this value.  It looks
> like this:
>
> Me.flowLayoutPanel1.SetFlowBreak(Me.label1, True)
>