[Gambas-user] Re-arrange controls
Benoît Minisini
gambas at ...1...
Tue Feb 22 17:27:14 CET 2011
> Hi,
>
> I have a from with arrangement=Vertical. I add some buttons in code like:
> button1 = new Button(Form1)
> button2 = new Button(Form1)
> .....
> Of course when program starts, the buttons are displayed from top to bottom
> with order: button1 => button2 .....
> I want to rearrange those buttons with new order like button1 -> button3 ->
> button2... I tried reparent them out (into an hidden container) and
> reparent them again into my form with new order.
> Is there an other and better way to rearrange those buttons in run-time
> with new order?
Yep. By using the Lower() and Raise() method, or by setting the Next and
Previous properties (in Gambas 3).
Regards,
--
Benoît Minisini
More information about the User
mailing list