Jump to content



Photo

How GUISetGroup ( ) works?


  • Please log in to reply
9 replies to this topic

#1 ezzetabi

ezzetabi

    さくらが さいた

  • Active Members
  • PipPipPipPipPipPip
  • 2,011 posts

Posted 22 July 2004 - 05:22 PM

The help file seemed lacking of info for me...

How can I make multiple group? How can I say "make this of radio controls a group and this ones an other"?





#2 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 9,529 posts

Posted 22 July 2004 - 07:57 PM

The help file seemed lacking of info for me...

How can I make multiple group? How can I say "make this of radio controls a group and this ones an other"?

What do you mean by "multiple group"? :ph34r:

Edit:

Bear in mind that a group box (the visible box around a number of controls) is different than a GuiSetGroup. GuiSetGroup just tells autoit which controls are to be grouped together for tabbing/checkbox purposes.

Edited by Jon, 22 July 2004 - 08:07 PM.


#3 ezzetabi

ezzetabi

    さくらが さいた

  • Active Members
  • PipPipPipPipPipPip
  • 2,011 posts

Posted 23 July 2004 - 06:46 AM

I didnt understand how use Guisetgroup for making group of radio controls... And allow the user click a radio control and automatically reset all others.

Edited by ezzetabi, 23 July 2004 - 06:47 AM.


#4 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 23 July 2004 - 02:29 PM

Here's one example; see the newest helpfile for another example:
Opt("GUINotifyMode", 1) GuiCreate("MyGUI") GUISetGroup ( ) $radio_1 = GUISetControl("radio", "Radio 1", 20, 30, 90, 30) $radio_2 = GUISetControl("radio", "Radio 2", 20, 70, 90, 40) $radio_3 = GUISetControl("radio", "Radio 3", 20, 120, 90, 40) GuiSetControlEx($radio_1, 1);checked GUISetGroup ( ) $radio_A = GUISetControl("radio", "Radio A", 200, 30, 80, 40) $radio_B = GUISetControl("radio", "Radio B", 200, 80, 80, 50) $radio_C = GUISetControl("radio", "Radio C", 200, 140, 80, 40) GuiSetControlEx($radio_B, 1);checked GuiShow() While 1     $msg = GuiMsg(0)     If $msg = -3 Then Exit WEnd

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

#5 ezzetabi

ezzetabi

    さくらが さいた

  • Active Members
  • PipPipPipPipPipPip
  • 2,011 posts

Posted 23 July 2004 - 02:35 PM

aHHH.. So it is grouped any Radio control between a GUISetGroup ( ) and the next GuiSetControlEx(radio) ?

#6 Arctor

Arctor

    Wayfarer

  • Active Members
  • Pip
  • 65 posts

Posted 23 July 2004 - 08:16 PM

aHHH.. So it is grouped any Radio control between a GUISetGroup ( ) and the next GuiSetControlEx(radio) ?

Think it is grouped till the next GUISetGroup(). I tried it without a GuiSetControlEx().
When you take away the 2nd GUISetGroup() in the example of Cyberslug, then all six radios are one group although there is a GuiSetControlEx() after the first three radios.

arctor

#7 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 9,529 posts

Posted 23 July 2004 - 08:22 PM

Think it is grouped till the next GUISetGroup(). I tried it without a GuiSetControlEx().
When you take away the 2nd GUISetGroup() in the example of Cyberslug, then all six radios are one group although there is a GuiSetControlEx() after the first three radios.

arctor

It's grouped until the next GuiSetGroup OR a new "group box" control is created.

#8 Arctor

Arctor

    Wayfarer

  • Active Members
  • Pip
  • 65 posts

Posted 23 July 2004 - 08:34 PM

It's grouped until the next GuiSetGroup OR a new "group box" control is created.

I just tried it. Right. It works. I thougt before: A GuiSetControl("group",.....) is just for visualization. So, if I use a GuiSetControl("group",.....) in the right place in my script (before each radio group) I don't need a GUISetGroup(). Is that right?

arctor

#9 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 9,529 posts

Posted 23 July 2004 - 09:04 PM

I just tried it. Right. It works. I thougt before: A GuiSetControl("group",.....) is just for visualization. So, if I use a GuiSetControl("group",.....) in the right place in my script (before each radio group) I don't need a GUISetGroup(). Is that right?

arctor

I did change it to just be a visualisation, but there was some complaining so I changed it back...

#10 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 23 July 2004 - 09:35 PM

Jon, have you considered doing it the Win32 way? Meaning:

GuiSetGroup($first, $last)

Where any control in the range (inclusive) of $first through $last is part of a group. This explicit declaration of which controls should be grouped together should remove some of the confusion.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users