Sign in to follow this  
Followers 0
alienkillaz

i need to setstate multiple gui items at once

5 posts in this topic

i have 1 button that is suposed to hide 10 other buttons when pressed

this is what i have but i think theres probably a way to do it more efficeintly

case $msg = $b7

guictrlsetstate($B1,$GUI_HIDE)

;guictrlsetstate($b2,$GUI_HIDE)

;guictrlsetstate($b3,$GUI_HIDE)

;guictrlsetstate($b4,$GUI_HIDE)

;guictrlsetstate($b5,$GUI_HIDE)

;guictrlsetstate($b6,$GUI_HIDE)

;guictrlsetstate($b7,$GUI_HIDE)

;guictrlsetstate($b8,$GUI_HIDE)

;guictrlsetstate($b9,$GUI_HIDE)

;guictrlsetstate($b10,$GUI_HIDE)

;guictrlsetstate($b11,$GUI_HIDE)

Share this post


Link to post
Share on other sites



That is the only way I know how to do it.

You could also always put it in a function so as to save re writing of the code.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

How about putting the 10 buttons on a seperate GUI window and using GUISetState to hide that whole window?

Share this post


Link to post
Share on other sites

Here's some code based on w0uter's suggestion if it helps:

Local $B[12]

$B[1] = GUICtrlCreate...
···
$B[11] = GUICtrlCreate...

···

Case $Msg = $B[7]
    For $I = 1 To 11
        GUICtrlSetState($B[$I], $GUI_HIDE)
    Next

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