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

Re: Reordering components in HPanel fails


On Wed, 17 Jul 2024 at 19:09, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> 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.
>
> Regards,
>
> --
> Benoît Minisini.
>

I hear ya Ben but i agree with Stéphane, there is a glitch.
Not often, but occasionally Something we do throws the order out but not
visibly in the IDE.

Like i said I have had many a times where 2 objects (eg 2 GridViews) are
expanded in a horizontal panel or a Splitter and for some reason they
become inverted when the program runs. (also buttons in a HBox have got out
of order to what they look in the ide)

They do not switch place in the IDE but when I run the program the 2
objects can suddenly be on the wrong sides.

I usually fix by doing a Cut on the right hand object, then move the left
object a little bit, then paste the right hand object in again.  Then they
usually show correctly again.

I do not know what causes it appear out of order.

Respects
BruceS

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>