Jump to content

How to hide/unhide controls?


RAMzor
 Share

Recommended Posts

I will create some controls on my GUI for advanced use. For this I want create "Advanced" button and hide all advanced contros "outside" of my gui :D so if I change GUI size we will see aditional controls.

My quastion is: How can I change size of created by GuiCreate window? I tryed WinMove but this shrink my window.

...Or You have anather idea to hide/unhide button?

Sorry for my English :wacko:

Link to comment
Share on other sites

#include <GUIConstants.au3>
$GUI = GUICreate("List", 302, 402)
$chk = GUICtrlCreateCheckbox("test",1,1,90,20)
$chk2 = GUICtrlCreateCheckbox("test",100,1,90,20)
$btn = GUICtrlCreateButton("Toggle",5,320,90,20)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $btn
            If BitAND(GUICtrlGetState($chk2),$GUI_HIDE) Then
                GUICtrlSetState($chk2,$GUI_SHOW)
                WinMove($GUI,"", $Win_Pos[0], $Win_Pos[1], 302)
            Else
                GUICtrlSetState($chk2,$GUI_HIDE)
                $Win_Pos = WinGetPos($GUI)
                WinMove($GUI,"", $Win_Pos[0], $Win_Pos[1], 200)
            EndIf
    EndSelect
WEnd

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...