Hallo,
ist es möglich, mit nur 1 befehl, sämtliche controls in einer group zu disablen ... also quasi nur die group immer dis-/enablen zu müssen?
Hallo,
ist es möglich, mit nur 1 befehl, sämtliche controls in einer group zu disablen ... also quasi nur die group immer dis-/enablen zu müssen?
Nicht, dass ich wüsste :(.
Aber ein Freak, weiß bestimmt was :D. Progandy, Gta, englisches Forum? ![]()
peethebee
Aber ein Freak, weiß bestimmt was :D. Progandy, Gta, englisches Forum?
LOL
Also, du könntest eine ChildGUI machen und die dann disabeln oder du speichertst die Controlhandles in ein Array und machst dann eine Schleife.
Als letze Möglichkeit kannst du auch am Anfang und am Ende der Group die ControlIDs speichern oder an diesen Stellen Dummies hinmachen.
#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]Local $radio_1, $radio_2, $msg, $GroupBegin, $GroupEnd, $buttonOff, $buttonOn
GUICreate("My GUI group")
;##############################################################
$GroupBegin = 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)
$GroupEnd = GUICtrlCreateDummy()
;##############################################################
GUIStartGroup() ; close group
$buttonOn = GUICtrlCreateButton("On", 10, 60, 100, 20)
$buttonOff = GUICtrlCreateButton("Off", 10, 90, 100, 20)
GUISetState()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $buttonOn
_SetGroupState($GroupBegin, $GroupEnd, $GUI_ENABLE)
Case $buttonOff
_SetGroupState($GroupBegin, $GroupEnd, $GUI_DISABLE)
EndSwitch
WEnd
Func _SetGroupState($nIDStart, $nIDStop, $nState)
; Author: Prog@ndy
Local $i
For $i = $nIDStart To $nIDStop
GUICtrlSetState($i, $nState)
Next
EndFunc
aaaaah, das schaut doch schonmal gut aus =)
thx, so werd ich mir das auch basteln