[Gambas-user] Three questions about handling
Benoit Minisini
gambas at ...1...
Tue Apr 19 11:08:46 CEST 2005
On Friday 15 April 2005 09:11, Eilert wrote:
> Good morning everyone!
>
> Before I start my next project, I'd like to discuss 3 items I've come
> across over the last weeks.
>
> First: How (and what for) do you use HPanel, VPanel, HBox, VBox? In
> other IDEs I've seen a way of connecting the elements in a window so
> when the user changes its size, the elements will automatically react to
> it. Is this possible to achieve with those here, or maybe in some other
> way? (Up to now I used to do this by code in the Resize event.)
HPanel automatically arrange its children horizontally.
VPanel '''''''''''''''''''''''''''''''''' vertically.
HBox arrange them from left to right, and then from top to bottom.
VBox arrange them from top to bottom, and then from left to right.
Another way of automatically arranging controls is using the 'Arrange'
property of the Panel and Form controls.
Moreover, each control has a 'Expand' property that tells it to fill its
parent control in the direction of its arrangement.
>
> In the extended collection there are sliders, but you cannot drag them
> to whatever position but they "jump" really to fixed positions. Can I
> change that somehow?
What are you talking about ?
>
> Second: How do you arrange your projects internally to not lose overview
> over the many SUBs/Functions? I usually set up several modules
> containing certain stuff which can be done independently from the forms
> (loading/saving, printing, ini-file handling etc.), but sometimes in
> those modules and in the form modules the number of SUBs grows so much
> it actually produces a long, long list which it is very hard to pick up
> a certain function from. Are there any "rules" from a professional
> programmer's point of view to avoid this?
>
> Third: Are there any speed issues to certain language elements, for
> instance, SELECT CASE being slower than IF/ELSE or DO...LOOP faster than
> FOR...NEXT?
FOR...NEXT is a bit optimized, but any other control structure is replaced by
tests (IF/ELSE) and jumps (GOTO).
To see the code generated by the compiler, compile your project by hand with
the '-v' option:
$ gbc -v
>
> Thank you for any insight!
>
> Rolf
>
>
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list