SYNOPSIS
use Tk::CheckbuttonGroup;
my($top) = MainWindow->new();
my $selected = 'two';
my $radiobuttongroup = $top->RadiobuttonGroup (
-list => [qw( one two three four five )],
-orientation => 'vertical',
-variable => \$selected,
-command => sub {
print @selected, "\n";
}
);
WIDGET-SPECIFIC OPTIONS
Name: list
Class: List
Switch: -list
The names for the radiobuttons to be contained in this widget. If
given as a list reference, the same value is used for the
radiobutton's label and its value. If given as a hash reference, the
keys are used as each radiobutton'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.
Name: orientation
Class: Orientation
Switch: -orientation
May be 'vertical' or 'horizontal'. Specifies how the radiobuttones
are stacked.
Name: variable
Class: Variable
Switch: -variable
A reference to a scalar, whose value is that of the selected
radiobutton, and is updated as the user interacts with the widget.
This variable is not watched, and so state of the widget is only
updated by changing the -variable option.
Name: command
Class: Command
Switch: -command
Specifies a perl/Tk callback to associate with all of the
radiobuttons.
DESCRIPTION
Displays a set of related radiobuttones with a frame in vertical or
horizontal orientation.
All radiobuttones 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 radiobuttons it manages.
BUGS
The reference passed in the -variable option is not watched, and so the
radiobuttons will not automatically update themselves if the scalar
given in that reference changes.
AUTHOR
By: Joseph Annino <
[email protected]>
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.