dynamic menu help please

Hello,

I have a textField where I would start to type, I also have an array of strings.

As I start to type, If the array elements start with the text that was typed, the array elements are now displayed, each in in its own textFiled, one below the other like a menu.

On Mac this works great but on PC the “Menu” is hidden by controls that are already there in the window.

How can I get those “menu items” to appear in front of the already existing controls?

Lennox

This happens because the objects underneath are fighting to be redrawn with the objects you’re putting “above” them, which doesn’t happen on Mac. I don’t know of any way to stop this from happening on Windows.

The sad truth is that trying to “layer” objects like this works on Mac, but in a x-plat app is just not going to work. Any time you want to do something like this x-plat, use a canvas. Layer the objects yourself in the canvas. Then you don’t have these refresh issues on Windows.

Otherwise, you’re stuck with strategies like: before you show your “menu” of objects, just hide all the controls behind it. It looks pretty lame but makes your menu work otherwise as expected. If you wanted to really try to hack it, you could try to take a snapshot image of the controls behind your “menu” before you show it, then hide the controls, then draw your snapshot behind your “menu”. But I wouldn’t bother.

[quote=228831:@Lennox Jacob]Hello,

I have a textField where I would start to type, I also have an array of strings.

As I start to type, If the array elements start with the text that was typed, the array elements are now displayed, each in in its own textFiled, one below the other like a menu.

On Mac this works great but on PC the “Menu” is hidden by controls that are already there in the window.

How can I get those “menu items” to appear in front of the already existing controls?
[/quote]

You know you can change the order of controls in the IDE with the icons immediately under the Run button. It allows you to set what will be shown in the front, in the back, or set the order with arrows up and down.

Thanks Michel,

I thought of doing that but then I didn’t, I will try it.

Thanks again.

Lennox