Jump to content

Recommended Posts

Could anyone be as kind as to post a short snippet of 4 checkboxes where the 4th one disables the 3 first ones... as in the user not being able to choose them when the 4th box it checked.

Also, when the 4th box is checked, the other 3 gets checked automaticly.


[]program 1

[]program 2

[]program 3

[]All programs

Thanx in advance.

Link to post
Share on other sites

search the forum for GUICtrlCreateCheckbox. You will immediately find some examples.



__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to post
Share on other sites

$main = guicreate ("Main", 300, 300)
$cb1 = guictrlcreatecheckbox ("Checkbox1", 10, 10)
$cb2 = guictrlcreatecheckbox ("Checkbox2", 10, 40)
$cb3 = guictrlcreatecheckbox ("Checkbox3", 10, 70)
$cb4 = guictrlcreatecheckbox ("Checkbox4", 10, 100)
while 1
$msg = guigetmsg()
if $msg = $GUI_EVENT_CLOSE then
if guictrlread($cb4) = 1 then
if guictrlgetstate($cb3) = 80 Then
guictrlsetstate ($cb1, $GUI_CHECKED + $GUI_DISABLE)
guictrlsetstate ($cb2, $GUI_CHECKED + $GUI_DISABLE)
guictrlsetstate ($cb3, $GUI_CHECKED + $GUI_DISABLE)
if guictrlgetstate($cb3) = 144 Then
guictrlsetstate ($cb1, $GUI_ENABLE)
guictrlsetstate ($cb2, $GUI_ENABLE)
guictrlsetstate ($cb3, $GUI_ENABLE)

you have to uncheck all cb by yourself

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

    No registered users viewing this page.

  • Create New...