Control View order in IDE

How do I know which control I am moving to the front or back in the IDE?
When I select 2 (or more) controls, and click the move forward or move back icons, nothing changes in the IDE until I actually RUN the program.
How do you determine (and select) which control is it moving forward and backward?

select the control(s) on the layout editor

not sure thats exactly what you’re asking though as that seems far too straight forward :slight_smile:

in the layout editor you’re not likely to see much visual difference as the controls dont necessarily draw in the exact same manner they will at runtime
they may not obscure ones behing others as that makes it hard to select items (although you can always select them in the left hand navigation pane)

Ok, what’s messing me up is that sometimes controls can be moved forward and backward, sometimes the “order” buttons are greyed out.
I wish there were a manual way to adjust all control’s order, the way there is with the Tab order…

I don’t understand why the order controls are sometimes greyed out. I have a label I want to be on top of a button, but I can’t get it to stay on top. Also it’s transparency doesn’t seem to be consistent. At one point the button was visible through the label, but now the label is back to being opaque, no matter how I change its transparency.

Do you know if the IDE creates designer “code” similar to the way it does in Visual Studio? If so, I could probably edit it faster than I can get this frickin IDE to behave!

Deleted the label and created a new one and now it’s sitting on top and transparent.
Buggy IDE I guess…

If a control is already “frontmost” then you cant move it more front
Same for if its already at the back - you cant move it further back
If its neither frontmost or backmost you can move it forward or backward

No it doesnt write code you can edit for each control or for the layout itself

[quote=452154:@Norman Palardy]If a control is already “frontmost” then you cant move it more front
Same for if its already at the back - you cant move it further back
If its neither frontmost or backmost you can move it forward or backward[/quote]
I get that. Sometimes ALL movement buttons are greyed out. The only fix seems to be to delete the control and re-add it.


huh - cant say I’ve run into that but I dont doubt that this could occur

As for writing some kind of xml, json, or something else you could edit as text its not out of the realm of possibility but I cant say I’m aware anyone has ever submitted a feature request for such a thing

Ok, got me thinking. Seems if I save the project as XML, I can edit the “InitialParent” field in the XML file. I may try that if I get stuck again.

InitialParent has more to do with control parenting not so much z-order

I just realized that in the (MacOS) IDE, when you select a control, it shows a red line around the parent control.

Which value sets the z-order in the XML file?

actual order of controls in the xml
backmost to frontmost
so there’s a LOT of editing as you have to move all the XML between and for each control to rearrange this

Gotcha. Thank you!

The selected control is also selected in teh navigator and displayed its info in the Inspector. Very straightforward.

Dont do that. Even if that is possible in virtually every other IDE out there, Xojo has a nasty bug with overlapping controls. The oficial posture is, that can’t be done, its the OS fault. So even using the z order, your controls will have some flicker and unexpected behavior.

The red border indicates the control is contained in another control. Don’t do that unless you intend to. When you add a new control look for that red border and recreate the control elsewhere and then move it. I fight with this occasionally.

I would think that you might be better off replacing the button AND the label with a canvas. You can draw into it whatever background and text you want, and implement the MouseDown and MouseUp events to emulate a Pushbutton.