Jump to content

Newer Pics Layered Below Older Ones


RealisT
 Share

Recommended Posts

Windows XP SP3

Script is creating some GUI Pic objects on my GUI form. Initial objects display correctly. Unfortunately, when the code creates some more GUI pics dynamically later on, they show up layered underneath the initial pics.

(In other languages, one can designate a 'z-index' to manage things like this, But I understand that AutoIt manages it by 'newest one goes on top').

How can I cause these later pics to show up on the topmost display layer?

Thanks

Link to comment
Share on other sites

Take a look at _WinAPI_SetWindowPos(), I think it can change the z-order of controls too. Note you have to pass the handles to everything with that function. No ControlID.

:x

Edit: Maybe not. Quickie demo didn't work, and I don't have to time to play with it right now.

:P

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

_WinAPI_SetWindowPos did not work, at least with my attempt at using it for a control instead of a window.

What's really getting me: setting the new pics to extended style $WS_EX_TOPMOST doesn't work either. Crazy!

I don't believe I have ever had this problem before. How could I mess up a 'newest pic on top' method anyway?

Any other suggestions are welcome.

Thanks

Link to comment
Share on other sites

And sometimes, when the newest pic is created, it appears for an instant to be layered on top. But something seems to "force" it down below older pics.

I've tried to replace the older pics with labels. No change; the newer pics still are layered underneath!

What must I do?

Link to comment
Share on other sites

Surprisingly little response. Oh well.

Can't identify the cause of the problem, but there is a simple enough workaround. GUICtrlSetPos() moves the pic to the top as long as at least one value is changed from the original. Still seems kludgy to me, but it will have to do for now.

Can someone at least answer how a GUI-oriented language such as AutoIt can be so weak at control layering functionality? Don't people take pride in their work anymore?

Link to comment
Share on other sites

Another MVP verified for me that _WinAPI_SetWindowPos() has the same limitation as GuiCtrlSetPos(), it requires a change in at least one value to have effect.

Don't people take pride in their work anymore?

You are welcome to go find somewhere else where they do so to your satisfaction...

:x

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...