Problem moving components in IDE

I’m modifying the look of my application. I moved a TabPanel off of the window. Placed a ContainerControl on the window. When i move the TabPanel back to the window (now on the ContainerControl), it looks as though the TabPanel is in place, but running the application the TabPanel is not visible.

I’m using Xojo on Windows 8.

I have not worked much with RB/Xojo yet. I guess in MS VC++ or other such IDEs there used to be an option to “Bring to front” or “Send to back” for arranging the various objects in a Form (Window). May be something similar exits in RB/Xojo.

I was looking for that myself, but didn’t find anything.

Here’s the order buttons located at the top.

This is called Z-Order. And I don’t know how it works in Xojo. Usually visual objects have a base class with a property called zIndex or something like that. I believe that this base visual class is RectControl in Xojo. How can we access/set the z-index of an object?

Thanks Rob, but even the ‘order’ buttons don’t work.

You cant as there’s no consistent access to zOrder after the window & its controls have been constructed on each platform.
You might find a platform specific declare but I have no idea what impact that might have as not all controls are fully native.

I couldn’t reproduce Robert’s case on a Mac. Maybe a Windows specific bug?

Anyone else have a suggestion?

Best I can suggest is design your window the way you want it then create a new window and copy and place your controls one by one in the order you want them. Not tested but it may work. I’ve been through it before and as I recall this is what worked for me.

I was afraid of that… :slight_smile: Thank you Peter.

We are trying to develop a card game with Xojo, porting/moving it from .net 2.0.

The main problem we’re finding is all regarding the missing of the z-order for canvas objects: xojo does not provide this type of control at all, even if very old windows languages did (like Visual Basic 4, and also all the .net framework versions from the very beginning). We are talking about languages more than 10 years old.

We also tryed serveral “walk-trough”, like using a single canvas and repainting images inside it, but it’s almost impossibile to smootly handle anything without the screen to flicker on windows platform. Using single canvas also is a total pain because single images always get “messy” when they overlay with others.

It would be very nice to have an official response from xojo staff, in order to understand if this missing feature is planned to be solved in the next features or if we need to really leave the xojo develop and start a .net 4.0/wfc linked only to windows, loosing all the beauty of having a cross-platform game developed with xojo as we liked.

You guys can help eliminate flicker and control z-order (even child controls) w/ Windows API calls.

Ref. SetWindowsPos API function for the z-order control.

[quote=17796:@Eric Brown]You guys can help eliminate flicker and control z-order (even child controls) w/ Windows API calls.

Ref. SetWindowsPos API function for the z-order control.[/quote]

Wonderful, but what about mac osx and linux ? We wish to develop with xojo because of the cross-platform support…

First off… DO NOT USE MULTIPLE canvas.

Use ONE canvas as your game board… and do everything there. create your cards as self-drawing classes…

It takes a little imagination but it can be done, and works very very well…

with ZERO flicker.

If you’re putting controls on top of one another using z-order expect a lot of flickering
This is particularly true on Windows as we’re using the Win 32 API’s NOT .Net api’s (which would let us use double buffered composited windows)
Linux has this issue to some degree for similar reasons.