Tk::CheckbuttonGroup - widget displays and manages a group of related checkbuttons
use Tk::CheckbuttonGroup; my($top) = MainWindow->new(); my @selected = qw(two four); my $checkbuttongroup = $top->CheckbuttonGroup ( -list => [qw( one two three four five )], -orientation => 'vertical', -variable => \@selected, -command => sub { print @selected, "\n"; } );
The names for the checkbuttons to be contained in this widget. If given as a list reference, the same value is used for the checkbutton's label and its value. If given as a hash reference, the keys are used as each checkbutton's label, and the values as their values. If given a list reference whose first element is a list reference, the sublist will be treated as a set of ordered key value pairs which is then treated as an ordered hash.
May be 'vertical' or 'horizontal'. Specifies how the checkboxes are stacked.
A reference to an array, whose elements contain the values of all checked checkbuttons, and is updated as the user interacts with the widget. May also be a comma delimited string scalar. This variable is not watched, and so state of the widget is only updated by changing the -variable option.
Specifies a perl/Tk callback to associate with all of the checkbuttons.
Displays a set of related checkboxes with a frame in vertical or horizontal orientation.
All checkboxes are advertised with the names given in the -list option.
Any additional options which are given to this widget are applied to all of the checkbuttons it manages.
The reference passed in the -variable option is not watched, and so the checkbuttons will not automatically update themselves if the list given in that reference changes.
Joseph Annino <jannino@jannino.com> http://www.jannino.com
Copyright (c) 2002 American Museum of Natural History. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Tk::CheckbuttonGroup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::CheckbuttonGroup
CPAN shell
perl -MCPAN -e shell install Tk::CheckbuttonGroup
For more information on module installation, please visit the detailed CPAN module installation guide.