Sign in to follow this  
Followers 0

Autoit Gui Overlapping Controls

4 posts in this topic

#1 ·  Posted (edited)

If controls overlap, can you set what control is always on top (or always on bottom)?

I have an idea for to make AutoBuilder respond to click events by making the dialog one big button. It seems to work; however, the "big button" keeps appearing on top hiding all other controls :D

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)

GuiCreate("MyGUI", 512,384)
; Make the entire GUI one big button so I can detect clicks!
$edit1 = GUISetControl("edit", "I disappear....", 100,100, 100,100)
$click = GUISetControl("button", " ", -99,-99, 9999, 9999)
$edit2 = GUISetControl("edit", "I disappear....", 10,10, 100,100)

While 1
    $msg = GuiMsg(0)
    If $msg = -3 Then ExitLoop
    If $msg = $click Then
        $p = MouseGetPos()
        MsgBox(4096,"Clicked", $p[0] & ", " & $p[1])
Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post

Link to post
Share on other sites

The last control with focus is the one on top, I think. Try partially overlapping two controls, then alternate clicking between them and you should see one clip the other, then when you click the newly clipped one, the other will get clipped. I think that's how it works, at any rate. I always try to avoid overlapping controls so I can't remember the exact behavior...

Share this post

Link to post
Share on other sites

Could the GUI be made so that a click on the bare client area of the dialog triggers a GuiMsg (and return a value such as -7)?

I leave the definitive answer to Valik/Larry, but I think no because every events are driven by the controls. That's the way the AU3GUI works (true LArry???) :D

Share this post

Link to post
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
Sign in to follow this  
Followers 0