Sign in to follow this  
Followers 0
Zealot

Help getting a checkbox to float over a button

3 posts in this topic

Hello,

I'm trying to get a checkbox to float above a button. I used GUICtrlSetState with $GUI_ONTOP on the checkbox, and it enables the box to be checked, but it doesn't keep it visible. Am I doing something wrong, or can anyone point out an alternate way?

Thanks,

Simon

Example code:

#include <GUIConstants.au3>
; Define the GUI
$GUIHandle= GUICreate("Button-Checkbox Experiment", 574, 469, -1, -1)
    $Button= GUICtrlCreateButton("Button", 10, 10, 100, 25)
    $Checkbox= GUICtrlCreateCheckbox("", 85, 15, 15, 15)
        GUICtrlSetState($Checkbox, $GUI_ONTOP)
    $OutputWindow= GUICtrlCreateEdit("", 10, 120, 300, 300)
GuiSetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $Button
            GUICtrlSetData($OutputWindow, "Button" & @CRLF & GUICtrlRead($OutputWindow))
        Case $msg = $Checkbox
            GUICtrlSetData($OutputWindow, "Checkbox" & @CRLF & GUICtrlRead($OutputWindow))
    EndSelect
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Share this post


Link to post
Share on other sites



Give the button $WS_CLIPSIBLINGS style.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Give the button $WS_CLIPSIBLINGS style.

Thank You!

Z

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