[Gambas-user] Control Layout questions

Mike Brett serif at ...1870...
Sun May 25 22:23:50 CEST 2008


Benoit:

Thanks very much for this which I'm working through. I've got qt-config 
sorted out, and would now like to compile and install my project on the 
target platform to see whether it looks anything like right.

I presume there must be some instructions/examples somewhere on 
gambasrad.org describing (for complete Gambas and Linux beginners) how 
to make executables from gambas projects - including things like what 
has to be installed on the target machine for things to work, even down 
to where the executable gets installed, whether you run it from a 
console etc.     I can't find anything on these questions at all - 
please could someone point me to the right URI?

Thank you.

- Mike -

Benoit Minisini wrote:
> On dimanche 25 mai 2008, Mike Brett wrote:
>> Advice would be appreciated on the following please....
>>
>> I'm trying to develop using 2.6.0 [using gb.qt and gb.qt.ext components]
>> on Fedora 8, for an eventual target user platform of the Asus eeePC (KDE
>> based 800x480 screen).
>>
>> I want to use several closely spaced rows of three controls - a Label
>> next to a TextBox next to a ComboBox. I have set the Font size of all
>> these controls to -4, because screen area is at a real premium.
> 
> You don't have to change the font size in your project. You must change the 
> default desktop font size, which might not be configure properly on Fedora. 
> You may have the same problem as Ubuntu users: the qt library is not 
> correctly configured when installed. To configure the qt library, you must 
> use the qtconfig program. Ask other Fedora users how to install it.
> 
>> Questions 1. Layout seems to be permanently set to snap to grid, and for
>> my purposes the grid increments are rather too big. Do I have control
>> over (a) snapping on/off, and (b) grid 'spacing'?
> 
> (a) Yes (b) No.
> 
> Grid spacing is half the default font height on Gambas 2. It is 1 + 33% the 
> default font font height on Gambas 3.
> 
> The idea behind that is that the height of all "one-line" controls like 
> Labels, TextBox, ComboBox, RadioButton, CheckBox must been two grid spaces. 
> (Three in Gambas 3).
> 
> Anyway, you should layout the control with the fixed grid the less as 
> possible. The grid is mainly there for the old vb users. You should always 
> use instead:
> 
> * The layout containers: HBox, VBox, HPanel, VPanel, or any other container 
> with the Arrangement property set.
> * The Padding and Spacing properties of these containers.
> * The Expand and Ignore property of the children controls.
> 
>> Questions 2. The Labels, TextBoxes and ComboBoxes all have a Height
>> setting of 22, and have been top-aligned; however the bottoms of the
>> ComboBoxes hang lower than the other two controls. I can however make
>> the ComboBoxes have the same visual height as the Label/TextBox by
>> dragging their bottom handle up. However the properties still show
>> height = 22 for all three control types, even after this adjustment. When I
>> (a) save and re-open the project, or
>> (b) run it
>> the comboboxes look slightly too tall again.
> 
> Why did I change the grid space in Gambas 3? Because I discovered that many 
> themes have enough border to make the 2 grid space height too small. As 
> ComboBoxes (and a few other controls) do not shrink if their contents are not 
> visible, it is sometimes too tall, even if Gambas thinks the contrary.
> 
>> Will the ComboBoxes in my final installation package look right or
>> wrong? What's actually going on here, and what control if any do I have
>> over the situation?
>>
>> Thanks - Mike -
>>
> 
> First, fix the qt library default font height, and tell me if things go better 
> after that.
> 
> Regards,
> 




More information about the User mailing list