Tk::RadiobuttonGroup - widget displays and manages a group of related radiobuttons
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"; } );
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.
May be 'vertical' or 'horizontal'. Specifies how the radiobuttones are stacked.
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.
Specifies a perl/Tk callback to associate with all of the radiobuttons.
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.
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.
By: 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::RadiobuttonGroup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::RadiobuttonGroup
CPAN shell
perl -MCPAN -e shell install Tk::RadiobuttonGroup
For more information on module installation, please visit the detailed CPAN module installation guide.