Sign in to follow this  
Followers 0
ryantollefson

Is a hidden button still selectable?

7 posts in this topic

Is a hidden button still selectable? So I have:

$blah2_button = GUICtrlCreateButton ("blah2", 50,50)
GUICtrlSetState(-1, $GUI_Hide)

Is there any way the user could still get this button, or do I also have to set $GUI_DISABLE?

Similar question - If I have a button placed outside of a GUI window (so it doesn't show up) is it selectable? I want to resize the GUI window - then when you see the button, you can click it - but I don't want to be able to "tab" or arrow to it when it isn't in the GUI.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is a hidden button still selectable? So I have:

$blah2_button = GUICtrlCreateButton ("blah2", 50,50)
GUICtrlSetState(-1, $GUI_Hide)

Is there any way the user could still get this button, or do I also have to set $GUI_DISABLE?

Not selectable. Which one (hide or disable) you select is which suits.

Similar question - If I have a button placed outside of a GUI window (so it doesn't show up) is it selectable? I want to resize the GUI window - then when you see the button, you can click it - but I don't want to be able to "tab" or arrow to it when it isn't in the GUI.

I would guess that as Not selectable as you are outside the border of your Gui. I have not been able to click a control which is outside a Gui yet.

:shocked:

Edited by MHz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

All right, I think I got the actual answer. Hidden buttons = not selectable; off gui buttons = selectable.

Script to prove it:

#include <GUIConstants.au3>

GUICreate ("My InputBox",100,100,-1,-1)

$btn_hidden = GUICtrlCreateButton ("hidden", 10,10)
GUICtrlSetState(-1, $GUI_HIDE)
$btn_off_gui = GUICtrlCreateButton ("off gui", 500,500)

GUISetState ()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $btn_hidden
            MsgBox(64, "hidden", "You found the button hidden")
        Case $msg = $btn_off_gui
            MsgBox(64, "off gui", "You found the button off gui")
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEndoÝ÷ ØGb´×¯z¹¢Ò7ög(û¬yÖ®¶­sb6æ6ÇVFRfÇC´uT6öç7FçG2æS2fwC° ¤uT7&VFRgV÷C´×çWD&÷gV÷C²ÃÃÂÓÂÓ ¢b33c¶'FåöFFVâÒuT7G&Ä7&VFT'WGFöâgV÷C¶FFVâgV÷C²ÂäuT7G&Å6WE7FFRÓÂb33c´uTôDR£²b33c¶'FåööfeöwVÒuT7G&Ä7&VFT'WGFöâgV÷C¶öfbwVgV÷C²ÂSÃS ¤uT6WE7FFR¥vÆR¢b33c¶×6rÒuTvWD×6r¢6VÆV7@¢66Rb33c¶×6rÒb33c¶'FåöFFVà¢×6t&÷cBÂgV÷C¶FFVâgV÷C²ÂgV÷Cµ÷Rf÷VæBFR'WGFöâFFVâgV÷C²¢²66Rb33c¶×6rÒb33c¶'FåööfeöwV¢²×6t&÷cBÂgV÷C¶öfbwVgV÷C²ÂgV÷Cµ÷Rf÷VæBFR'WGFöâöfbwVgV÷C²¢66Rb33c¶×6rÒb33c´uTôUdTåEô4Äõ4P¢W@¢VæE6VÆV7@¥tVæ

This lets you find the hidden ctrl

Edited by ryantollefson

Share this post


Link to post
Share on other sites

*Edit* Nevermind - I'm confused

Just as well. I was trying everything to try and click the off Gui button, but without success.

Even put the button right below the Gui so I could find it easier.

CODE
#include <GUIConstants.au3>

GUICreate ("My InputBox",100,100,-1,-1)

$btn_hidden = GUICtrlCreateButton ("hidden", 10,10)
GUICtrlSetState(-1, $GUI_HIDE)
$btn_off_gui = GUICtrlCreateButton ("off gui", 0, 100, 100)

GUISetState ()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $btn_hidden
            MsgBox(64, "hidden", "You found the button hidden")
        Case $msg = $btn_off_gui
            MsgBox(64, "off gui", "You found the button off gui")
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd
:shocked:

Share this post


Link to post
Share on other sites

Just as well. I was trying everything to try and click the off Gui button, but without success.

Even put the button right below the Gui so I could find it easier.

Tab then Space, or sometimes just Space to find it. Looks like I'm using $GUI_DISABLE

Share this post


Link to post
Share on other sites

Tab then Space, or sometimes just Space to find it. Looks like I'm using $GUI_DISABLE

Arrh, your right. I was concentrating on the mouse click concept. Yeah, tabing would spoil the idea for you if the user did that.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Alright - starting to make some sense of this...

It appears that you can't tab to a hidden button, but the hidden button can have focus (when GUI is first created or changed) - if you hit space while the hidden button has focus, then it is pressed. If you tab to a different (visible) button, then there doesn't appear to be a way to go back.

Edited by ryantollefson

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