Jump to content

Menu & GuiCreateGroup


Recommended Posts

Hello,

I have a short question about "Menu & GuiCreateGroup",

here are two screenshots:

Posted Image

Posted Image

First Screenshot:

If somebody click on "Einstellungen" --> "Übersicht" the GUICreateGroup "Uebersicht" will be opened.

This works fine.

Second Screenshot:

If somebody click on "Einstellungen" --> "IP adresse" the GUICreateGroup "IP Adresse" will be opened, but then I see two values of the side "Übersicht".

How Can I close the first GUICreateGroup, if somebody open a new one?

Link to comment
Share on other sites

No no, when you enable one group you must not disable the group after all, but _hide_ the other group, sorry, "disable" was the wrong word - show and hide are important.

And you have to use a controlid for GUICtrlSetState()!

I don't know what you do but it seems to me like not really thought about :).

You don't have to create all of the controls new with every function call.

Please take a look at my 2 samples here:

http://www.autoitscript.com/forum/index.php?showtopic=8753

So this is one possibility.

Another is to create 1 time all of the controls and only show them in the first function and hide them in the other function like:

Global $label1,$label2,$button
...
$label1 = GUICtrlCreateLabel("info",10,10,100,20)
$label2 = GUICtrlCreateLabel("status",10,10,100,20)
GUICtrlSetState(-1,$GUI_HIDE)
$button = GUICtrlCreateButton("OK",50,100,70,20)
...
Func ShowLabel1()
   GUICtrlSetState($label1,$GUI_SHOW)
   GUICtrlSetState($label2,$GUI_HIDE)
EndFunc

Func ShowLabel2()
   GUICtrlSetState($label2,$GUI_SHOW)
   GUICtrlSetState($label1,$GUI_HIDE)
EndFunc

So long...

Edited by Holger
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...