Tk::Wizard::Choices - Tk::Wizard pages to collect end-user choices
Tk::Wizard
Currently automatically loaded by Tk::Wizard, though this behaviour is deprecated and is expected to change in 2008.
Adds a number of methods to Tk::Wizard, to collect choices made by the end-user.
Allow the user to make multiple choices among several options: each choice sets a variable passed as reference to this method.
Accepts the usual parameters plus:
For the checkbox buttons - see Tk::options.
A reference to an array of hashes with the following fields:
Title of the option, will be rendered in bold
Text rendered smaller beneath the title
Reference to a variable that will contain the result of the choice. Croaks if none supplied. Your -variable will contain the default Tk::Checkbutton values of 1 for checked and 0 for unchecked.
Pass a true value to specify that the box should initially appear checked.
Here is an example of what the -choices parameter should look like:
$wizard->addMultipleChoicePage( -title => "Another toy example", -choices => [ { -title => 'choice 1', -variable => \$choice1, }, { -title => 'choice 2, default is checked', -variable => \$choice2, -checked => 1, }, ], );
Allow the user to make one choice from among several options (i.e. a group of radio buttons). Each choice sets a variable passed as reference to this method.
For the radio buttons - see Tk::options.
Reference to a variable that will contain the result of the choice. Croaks if none supplied. Your -variable will contain the -value of the radio button that is selected when the user clicks "Next".
This value will be placed in your -variable variable if this button is selected
Pass a true value to specify that this radio should initially appear selected. If none of the choices have -selected, then the first choice will be selected by default.
$wizard->addSingleChoicePage( -title => 'Another toy example', -text => 'Choose one of the following:', -variable => \$choice, -choices => [ { -title => 'choice 1', -value => 1, }, { -title => 'choice two, default this one selected', -value => 'two', -selected => 1, }, ], );
Lee Goddard (lgoddard@cpan.org).
Copyright (C) Lee Goddard, 11/2002 - 01/2008 ff.
Made available under the same terms as Perl itself.
To install Tk::Wizard, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::Wizard
CPAN shell
perl -MCPAN -e shell install Tk::Wizard
For more information on module installation, please visit the detailed CPAN module installation guide.