Jump to content

GUIStartGroup()


strate
 Share

Recommended Posts

Is it possible to turn these off and on? For instance I have three different groups, can I remove their groups and set one large one to cover all of the different sections?

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Link to comment
Share on other sites

not sure why you would want to do something like this, if this is your own code, then something like the following would work, but doesn't change how the groups work, unless you deleted the controls in the groups also and rebuilt them. for example:

#include <GuiConstants.au3>
If(Not IsDeclared("GUI_Width")) Then Global Const $GUI_Width = 500
If(Not IsDeclared("GUI_Height")) Then Global Const $GUI_Height = 500
If(Not IsDeclared("BTN_Width")) Then Global Const $BTN_Width = 80
If(Not IsDeclared("BTN_Height")) Then Global Const $BTN_Height = 40

Dim $rdoButton_1,$rdoButton_2,$rdoButton_3,$grp1,$grp2,$grp,$Groups,$hwnd

$hwnd = GuiCreate("Group Test", $GUI_Width, $GUI_Height,(@DesktopWidth-$GUI_Width)/2, (@DesktopHeight-$GUI_Height)/2 , $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS)

$Groups = GuiCtrlCreateButton("groups", $GUI_Width - ($BTN_Width + 20), $GUI_Height - ($BTN_Height + 70), $BTN_Width, $BTN_Height)

$grp1 = GUICtrlCreateGroup("group 1",5,$GUI_Height - ($BTN_Height + 135),$BTN_Width + 10,$BTN_Height + 25)
$rdoButton_1 = GUICtrlCreateRadio("Button 1", 10, $GUI_Height - ($BTN_Height + 120), $BTN_Width, $BTN_Height)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

$grp2 = GUICtrlCreateGroup("group 2",5,$GUI_Height - ($BTN_Height + 85),$BTN_Width + 10,($BTN_Height * 2)+ 45)
$rdoButton_2 = GUICtrlCreateRadio("Button 2",10,$GUI_Height - ($BTN_Height + 70),$BTN_Width,$BTN_Height)
$rdoButton_3 = GUICtrlCreateRadio("Button 3", 10, $GUI_Height - ($BTN_Height + 20), $BTN_Width, $BTN_Height)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

$Exit = GuiCtrlCreateButton("Exit", $GUI_Width - ($BTN_Width + 20), $GUI_Height - ($BTN_Height + 20), $BTN_Width, $BTN_Height)

GUISetState()


While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $Exit
        ExitLoop
      Case $msg = $Groups
          GUICtrlDelete($grp1)
          GUICtrlDelete($grp2)
          GUICtrlDelete($rdoButton_1)
          GUICtrlDelete($rdoButton_2)
          GUICtrlDelete($rdoButton_3)
          $grp = GUICtrlCreateGroup("group all",5,$GUI_Height - ($BTN_Height + 135),$BTN_Width + 10,($BTN_Height * 3) + 45)
            $rdoButton_1 = GUICtrlCreateRadio("Button 1", 10, $GUI_Height - ($BTN_Height + 120), $BTN_Width, $BTN_Height)
            $rdoButton_2 = GUICtrlCreateRadio("Button 2",10,$GUI_Height - ($BTN_Height + 70),$BTN_Width,$BTN_Height)
            $rdoButton_3 = GUICtrlCreateRadio("Button 3", 10, $GUI_Height - ($BTN_Height + 20), $BTN_Width, $BTN_Height)
            GUICtrlCreateGroup ("",-99,-99,1,1) ;close group
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    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.

 

Link to comment
Share on other sites

not sure why you would want to do something like this, if this is your own code, then something like the following would work, but doesn't change how the groups work, unless you deleted the controls in the groups also and rebuilt them. for example:

#include <GuiConstants.au3>
If(Not IsDeclared("GUI_Width")) Then Global Const $GUI_Width = 500
If(Not IsDeclared("GUI_Height")) Then Global Const $GUI_Height = 500
If(Not IsDeclared("BTN_Width")) Then Global Const $BTN_Width = 80
If(Not IsDeclared("BTN_Height")) Then Global Const $BTN_Height = 40

Dim $rdoButton_1,$rdoButton_2,$rdoButton_3,$grp1,$grp2,$grp,$Groups,$hwnd

$hwnd = GuiCreate("Group Test", $GUI_Width, $GUI_Height,(@DesktopWidth-$GUI_Width)/2, (@DesktopHeight-$GUI_Height)/2 , $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS)

$Groups = GuiCtrlCreateButton("groups", $GUI_Width - ($BTN_Width + 20), $GUI_Height - ($BTN_Height + 70), $BTN_Width, $BTN_Height)

$grp1 = GUICtrlCreateGroup("group 1",5,$GUI_Height - ($BTN_Height + 135),$BTN_Width + 10,$BTN_Height + 25)
$rdoButton_1 = GUICtrlCreateRadio("Button 1", 10, $GUI_Height - ($BTN_Height + 120), $BTN_Width, $BTN_Height)
GUICtrlCreateGroup ("",-99,-99,1,1);close group

$grp2 = GUICtrlCreateGroup("group 2",5,$GUI_Height - ($BTN_Height + 85),$BTN_Width + 10,($BTN_Height * 2)+ 45)
$rdoButton_2 = GUICtrlCreateRadio("Button 2",10,$GUI_Height - ($BTN_Height + 70),$BTN_Width,$BTN_Height)
$rdoButton_3 = GUICtrlCreateRadio("Button 3", 10, $GUI_Height - ($BTN_Height + 20), $BTN_Width, $BTN_Height)
GUICtrlCreateGroup ("",-99,-99,1,1);close group

$Exit = GuiCtrlCreateButton("Exit", $GUI_Width - ($BTN_Width + 20), $GUI_Height - ($BTN_Height + 20), $BTN_Width, $BTN_Height)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $Exit
        ExitLoop
      Case $msg = $Groups
          GUICtrlDelete($grp1)
          GUICtrlDelete($grp2)
          GUICtrlDelete($rdoButton_1)
          GUICtrlDelete($rdoButton_2)
          GUICtrlDelete($rdoButton_3)
          $grp = GUICtrlCreateGroup("group all",5,$GUI_Height - ($BTN_Height + 135),$BTN_Width + 10,($BTN_Height * 3) + 45)
            $rdoButton_1 = GUICtrlCreateRadio("Button 1", 10, $GUI_Height - ($BTN_Height + 120), $BTN_Width, $BTN_Height)
            $rdoButton_2 = GUICtrlCreateRadio("Button 2",10,$GUI_Height - ($BTN_Height + 70),$BTN_Width,$BTN_Height)
            $rdoButton_3 = GUICtrlCreateRadio("Button 3", 10, $GUI_Height - ($BTN_Height + 20), $BTN_Width, $BTN_Height)
            GUICtrlCreateGroup ("",-99,-99,1,1);close group
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    EndSelect
Wend

<{POST_SNAPBACK}>

THANK YOU!! This is wonderful it works great for what I need.
INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
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...