Main > Programming > Libraries >

Tk::Optionmenu 804.027

Tk::Optionmenu 804.027

Sponsored Links

Tk::Optionmenu 804.027 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 5.7 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 794
Date added: 2007-08-21
Publisher: Tk team

Tk::Optionmenu 804.027 description

Tk::Optionmenu will let the user select one of some predefined options values.

SYNOPSIS

use Optionmenu;

$opt = $w->Optionmenu(
-options => REFERENCE_to_OPTIONLIST,
-command => CALLBACK,
-variable => SCALAR_REF,
);

$opt->addOptions( OPTIONLIST );

# OPTION LIST is
# a) $val1, $val2, $val3,...
# b) [ $lab1=>$val1], [$lab2=>val2], ... ]
# c) combination of a) and b), e.g.,
# val1, [$lab2=>val2], val3, val4, [...], ...

The Optionmenu widget allows the user chose between a given set of options.

If the user should be able to change the available option have a look at Tk::BrowseEntry.

OPTIONS

-options

(Re)sets the list of options presented.

-command

Defines the callback that is invokes when a new option is selected.

-variable

Reference to a scalar that contains the current value of the selected option.

-textvariable

Reference to a scalar that contains the text label of the current value of the selected option.

METHODS

addOptions

Adds OPTION_LIST to the already available options.

EXAMPLE

use Tk;
my $mw = MainWindow->new();

my ($var, $tvar);
my $opt = $mw->Optionmenu(
-options => [[jan=>1], [feb=>2], [mar=>3], [apr=>4]],
-command => sub { print "got: ", shift, "n" },
-variable => $var,
-textvariable => $tvar
)->pack;

$opt->addOptions([may=>5],[jun=>6],[jul=>7],[aug=>8]);

my $f = $mw->Frame(-relief=>groove, -borderwidth => 2)->pack;
$f->Label(-textvariable=>$tvar)->pack(-side => left);
$f->Label(-text => " -> ")->pack(-side => left);
$f->Label(-textvariable=>$var)->pack(-side => left);

$mw->Button(-text=>Exit, -command=>sub{$mw->destroy})->pack;

MainLoop;

Tk::Optionmenu 804.027 Screenshot

Advertisements

Tk::Optionmenu 804.027 Keywords

Bookmark Tk::Optionmenu 804.027

Hyperlink code:
Link for forum:

Tk::Optionmenu 804.027 Copyright

WareSeeker periodically updates pricing and software information of Tk::Optionmenu 804.027 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Tk::Optionmenu 804.027 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Tk::Tiler is a scrollable frame with sub-widgets arranged into rows. Free Download
Tk::Balloon is a pop up help balloons. Free Download
Tk::form is a Perl module with a geometry manager based on attachment rules. Free Download
Tk::bind can arrange for X events to invoke callbacks. Free Download
Tk::event contains miscellaneous event facilities: define virtual events and generate events. Free Download
Tk::after can execute a command after a time delay. Free Download
Tk::Optionbox is another pop-up option-widget (with MULTI-level selections). Free Download
Tk::bindtags can determine which bindings apply to a window, and order of evaluation. Free Download