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

Re: Reordering components in HPanel fails


On Tue, 16 Jul 2024 at 12:20, Stéphane Aulery <lkppo@xxxxxxx> wrote:

> Hi,
>
> I try to clone AstroGrep under Linux
>
> https://astrogrep.sourceforge.net/pics/ss_main_new.png
>
> I'm having trouble with the layout. I can't get the fields to stretch
> horizontally. I guess I'm not using the right combination of containers
> and options. Maybe you can advise me on this (I'll provide a screenshot
> this evening).
>
> For the moment I tried to put ComboBoxes and Labels in an HPanel, itself
> in the left part of a Splitter. I use the HPanel because it
> automatically arranges the fields.
>
> My problem is that if I arrange the fields with the graphical editor or
> try to order them with the container tree viewer, I never get the
> controls in the order I want. If I reorder the fields in the container
> tree viewer and then save, the order is lost.
>
> I don't understand what order it follows unless it's the initial
> insertion order of the components, which is no use to me since you can't
> define an Order property.
>
> What am I doing wrong?
>

There are tricks i do to sort misordering out.

For example if the panel that should be on the right is appearing on the
left I would do this..
Right click the right hand panel and select Cut.
Move the left hand panel a pixel or 2
Then Paste the right hand panel back in again.
Then usually the ordering is correct again.

Also when you right click an object there is the Arrangement/Bring to Front
and Bring to Back options that rearrange the ordering.

By code you can use hMyPanel.Raise and hMyPanel.Lower commands.

Respects
BruceS

Follow-Ups:
Re: Reordering components in HPanel failsBruce Steers <bsteers4@xxxxxxxxx>
References:
Reordering components in HPanel failsStéphane Aulery <lkppo@xxxxxxx>