Jump to content

GUICtrlGetState and $GUI_FOCUS


Recommended Posts

In this code:

#include <GUIConstants.au3>

GUICreate("GUI", 300, 100)
$btn = GUICtrlCreateInput("Button1", 5, 5, 80, 20)
$btn1 = GUICtrlCreateButton("Button2", 105, 5, 80, 20)

GUISetState()

GUICtrlSetState ($btn, $GUI_FOCUS)

While 1
    TrayTip ( "title", GUICtrlGetState ($btn), 1)
Wend

Tip always shows 80 (I mean this $GUI_SHOW + $GUI_ENABLE), not matter focused button or not. So question, GUICtrlGetState should return also $GUI_FOCUS state or not? And the same for $GUI_DEFBUTTON.

Link to post
Share on other sites

In this code:

#include <GUIConstants.au3>

GUICreate("GUI", 300, 100)
$btn = GUICtrlCreateInput("Button1", 5, 5, 80, 20)
$btn1 = GUICtrlCreateButton("Button2", 105, 5, 80, 20)

GUISetState()

GUICtrlSetState ($btn, $GUI_FOCUS)

While 1
    TrayTip ( "title", GUICtrlGetState ($btn), 1)
Wend

Tip always shows 80 (I mean this $GUI_SHOW + $GUI_ENABLE), not matter focused button or not. So question, GUICtrlGetState should return also $GUI_FOCUS state or not? And the same for $GUI_DEFBUTTON.

<{POST_SNAPBACK}>

GUI_FOCUS GUI_DEFBUTTON are not state memorized just helpfull to select a control

GUICtrlGetState return the Enable/disable/hide/show state that GuiCtrlRead cannot return on certain control. :idiot:

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...