DigDeep Posted August 14, 2017 Share Posted August 14, 2017 Not sure what is wrong here. If I keep the Button after Lable, I can see the button but cannot click. If I keep it before Lable I can only see it if I click on it. I even tried with GUICtrlSetState($Button1, $gui_ontop) but it's still the same. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 405, 293, 333, 307) $Button1 = GUICtrlCreateButton("Button1", 168, 120, 75, 25) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000080) $Label1 = GUICtrlCreateLabel("Label1", 64, 64, 268, 161) GUICtrlSetBkColor(-1, 0x008000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, '', 'Button 1') EndSwitch WEnd Link to comment Share on other sites More sharing options...
DigDeep Posted August 14, 2017 Author Share Posted August 14, 2017 OK, I found it. Just added GUICtrlSetStyle(-1, $SS_CENTER) after the lable and it worked. 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