RealisT Posted December 8, 2010 Share Posted December 8, 2010 Windows XP SP3Script 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 More sharing options...
PsaltyDS Posted December 8, 2010 Share Posted December 8, 2010 (edited) 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. Edit: Maybe not. Quickie demo didn't work, and I don't have to time to play with it right now. Edited December 8, 2010 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 More sharing options...
RealisT Posted December 8, 2010 Author Share Posted December 8, 2010 _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 More sharing options...
RealisT Posted December 9, 2010 Author Share Posted December 9, 2010 Additional info:New labels appear on top, but the new pics appear underneath older pics. Very confusing. Link to comment Share on other sites More sharing options...
RealisT Posted December 9, 2010 Author Share Posted December 9, 2010 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 More sharing options...
RealisT Posted December 9, 2010 Author Share Posted December 9, 2010 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 More sharing options...
picea892 Posted December 9, 2010 Share Posted December 9, 2010 I don't have time to write something for you but I am convinced that PsaltyDS is correct. Winapi_setwindowpos should work. Please post a code snippet...hard to help without. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 9, 2010 Share Posted December 9, 2010 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... 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now