Jump to content
Sign in to follow this  
ArxBzFhblxphS

..

Recommended Posts

ArxBzFhblxphS
Posted Image Edited by Thanubis

Share this post


Link to post
Share on other sites
Jos

It needed to close a group so it isn't a waste of space (which is a little strange remark to make)

All controls between the start en end statement can be controlled by a single Handle assign to the start GUICtrlCreateGroup statement.

For example you can hide them all.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
martin

It needed to close a group so it isn't a waste of space (which is a little strange remark to make)

All controls between the start en end statement can be controlled by a single Handle assign to the start GUICtrlCreateGroup statement.

For example you can hide them all.

Jos

I don't think hiding a group hides all the controls in a group, though it would be very nice if all the controls in a group could be affected by the state of the group.

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $radio_1, $radio_2, $msg,$grp,$btn
    
    GUICreate("My GUI group")  

    $grp=GUICtrlCreateGroup("Group 1", 190, 60, 90, 140)
    $radio_1 = GUICtrlCreateRadio("Radio 1", 210, 90, 50, 20)
    $radio_2 = GUICtrlCreateRadio("Radio 2", 210, 110, 60, 50)
    GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
    $btn = GUICtrlCreateButton("hide group",100,170,80,22)
    GUISetState()    
    
   ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        if $msg = $btn then GUICtrlSetState($grp,$GUI_HIDE)
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    

EndFunc  ;==>Example

At the moment to hide a group you need to do this

#include <GUIConstantsEx.au3>
#include <windowsconstants.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $Gui, $radio_1, $radio_2, $msg,$grp,$btn,$grpw
    
    $Gui=GUICreate("My GUI group")  
    $grpw = GUICreate("group",90, 140, 190, 60,$WS_CHILD,-1,$Gui)
    $grp=GUICtrlCreateGroup("Group 1",0,0, 90, 140)
    $radio_1 = GUICtrlCreateRadio("Radio 1", 20, 30, 60, 20)
    $radio_2 = GUICtrlCreateRadio("Radio 2", 20, 50, 60, 50)
    GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
    GUISetState()
    GUISwitch($gui)
    $btn = GUICtrlCreateButton("hide group",100,170,80,22)
    GUISetState()     
    
   ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        if $msg = $btn then GUISetState(@SW_HIDE,$grpw)
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    

EndFunc  ;==>Example

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Jos

Guess I have done to much VB in the past where it works like that if I remember correctly. ^_^

You are right, it looks like it only groups things like Radio Controls together allowing to have multiple Groups of Radio selection groups.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.