Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This is probably a easy question. I have a tk gui that uses Checkbuttons. How do i keep only one button checked at a time.

2006-04-22 Retitled by g0n, as per Monastery guidelines
Original title: 'Checkbutton'

  • Comment on Tk: How do I keep only one button checked at a time?

Replies are listed 'Best First'.
Re: Tk: How do I keep only one button checked at a time?
by jpeg (Chaplain) on Apr 22, 2006 at 00:57 UTC
    I guess you could write a callback that would loop through the other Checkbuttons and toggle their onValue - but if only one may be selected at a time, why aren't you using radio buttons?
    --
    jpg
Re: Tk: How do I keep only one button checked at a time?
by Anonymous Monk on Apr 22, 2006 at 01:29 UTC

    Use radiobuttons not checkbuttons. sorry stupid question. ive used radiobuttons many times before just having a brain freeze.

Re: Tk: How do I keep only one button checked at a time?
by calin (Deacon) on Apr 22, 2006 at 18:59 UTC