Sign in to follow this  
Followers 0
BlueScreen

$GUI_Hide issues...

3 posts in this topic

Im trying to hide a control but cannot!

What is wrong?

Global $GUI_HIDE    = 32
Global $a
GuiCreate ("Inputs",450,230)

$SendMessagesReq=GuiSetControl ("checkbox", "Send messages?", 275,75)
GuiSetControlNotify ($SendMessagesReq)
    
GuiShow ()
While 1
    Sleep (1000)
    
    Select
  Case GuiRead ($SendMessagesReq)=1
     
     $a=GuiSetControl ("label", "blabla", 20,130,150)
         
  Case GuiRead ($SendMessagesReq)=4
     GuiSetControl ("label", "blabla", 20,130,150)
     GUISetControlEx ($a,$GUI_HIDE)
     
  EndSelect
    WEnd

Share this post


Link to post
Share on other sites



Like pekster said for your other question, use GuiMsg(0). Here's an example:

;; Global Stuff;;
Global $GUI_SHOW = 16
Global $GUI_HIDE = 32
Global $GUI_CHECKED = 1
Global $GUI_UNCHECKED = 4
Opt("GUINotifyMode", 1);all controls notify

;; GUI and controls;;
GuiCreate ("Inputs",450,230)
   $checkbox_1 = GuiSetControl("checkbox", "Hide the label", 275,75)
   $label_1 = GuiSetControl ("label", "blabla", 20,130, 150)
GuiShow ()

;; Message Loop;;
While 1
   Sleep(100);sleep not needed in newest beta versions
   $msg = GuiMsg(0)
   
   Select
   Case $msg = -3
      ExitLoop
   Case $msg = $checkbox_1
      If GuiRead($msg) = $GUI_CHECKED Then
         GUISetControlEx ($label_1, $GUI_HIDE)
      Else
         GUISetControlEx ($label_1, $GUI_SHOW)
      EndIf
   EndSelect
WEnd
Exit

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

Got it. 10x :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