[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reordering components in HPanel fails


Le 17/07/2024 à 20:09, Benoît Minisini a écrit :
Le 17/07/2024 à 17:53, Stéphane Aulery a écrit :
Le 17/07/2024 à 14:39, T Lee Davidson a écrit :
On 7/16/24 22:29, Stéphane Aulery wrote:
I was wrong, it's not an HPanel but a Panel. I think it doesn't change anything because the Arrangement property is on Vertical.

In the left column all elements have the same value for property X (7).

excution.png, form.png and FMain.form show that controls inside Panel3 are ordered by their order in FMain.form.


I also tried to set the X of LabelSearchOptions to 5 and the X LabelSearchText to 9, to check if X values change the ordering inside the panel in execution. It's still not better.

If a container has its Arrangement property set to Vertical, then their Y properties should determine their vertical order. Their width attempts to fill the horizontal space within the container. So, it is expected that you would not see any difference when changing their X properties.

The screenshots also show that Y plays no role.


Sorry, it does.

When you have a container that arranges its children, its arrangement is applied when the form is saved.

The children control are sorted in a way depending on the arrangement. For exemple, for a vertical arrangement, controls are sorted by their Y property. It's done so that the result is similar to how you layout the children controls in the form editor.

This order is the z-order of the children controls. So, if you use the Raise() and Lower() method on these children, it will arrange them again.

Note that you can see the control order in the Hierarchy tab of the form editor.

Please post your full project if you want me to look at it.

Obviously I don't want to say that X and Y play absolutely no role. There is, however, a mystery. Or perhaps I didn't understand your explanations.

I agree that the position of the child controls in the Panel3 panel on the left is identical to what the hierarchy of controls in the editor shows on the right. But when I launch the project that's not what I get (see the screenshot). Maybe I have a misconfigured secondary setting?

Project files are attached in a private email (too big for the mailing list). I use Gambas 3.18.0 on Debian 12 (bookworm). Thanks for your help.


--
Stéphane Aulery

Attachment: form_config_vs_form_exec.png
Description: PNG image


Follow-Ups:
Re: Reordering components in HPanel failsGianluigi <gradobag@xxxxxxxxxxx>
Re: Reordering components in HPanel failsT Lee Davidson <t.lee.davidson@xxxxxxxxx>
References:
Reordering components in HPanel failsStéphane Aulery <lkppo@xxxxxxx>
Re: Reordering components in HPanel failsBruce Steers <bsteers4@xxxxxxxxx>
Re: Reordering components in HPanel failsBruce Steers <bsteers4@xxxxxxxxx>
Re: Reordering components in HPanel failsStéphane Aulery <lkppo@xxxxxxx>
Re: Reordering components in HPanel failsT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: Reordering components in HPanel failsT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: Reordering components in HPanel failsStéphane Aulery <lkppo@xxxxxxx>
Re: Reordering components in HPanel failsStéphane Aulery <lkppo@xxxxxxx>
Re: Reordering components in HPanel failsT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: Reordering components in HPanel failsStéphane Aulery <lkppo@xxxxxxx>
Re: Reordering components in HPanel failsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>