Jump to content

Recommended Posts

Posted

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"?

  • Administrators
Posted (edited)

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
Posted (edited)

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
Posted

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!
Posted

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

  • Administrators
Posted

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.
Posted

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

  • Administrators
Posted

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...
Posted

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.

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
  • Recently Browsing   0 members

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