Sign in to follow this  
Followers 0
RAMzor

How to hide/unhide controls?

4 posts in this topic

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:

Share this post


Link to post
Share on other sites



Ok! But this option live free space on GUI and program look not proffesional :D

Share this post


Link to post
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.

 

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