use PPM::Repositories to find a repository with Tk, like http://www.bribes.org/perl/ppm/Tk.ppd

... http://search.cpan.org/dist/Tk/pod/Optionmenu.pod

You're looking at the wrong documentation, Tkx/Tkx::Tutorial says read the following

http://docs.activestate.com/activeperl/5.14/lib/Tcl/tkkit.html -> http://docs.activestate.com/activetcl/8.5/tcl/tk_contents.htm -> http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/optionMenu.htm

#!usr/bin/perl -- use strict; use warnings; $Tkx::TRACE = 64; use Tkx; my $mw = Tkx::widget->new("."); { my @fail_crit = ( '1. Maximum Strain', '2. Maximum Stress', '3. Tsai-Hill', '4. Modified Tsai-Wu', '5. Hoffman', ); my $chosen = ""; my $frame = $mw->new_ttk__frame(); $frame->g_pack(qw/ -expand 1 -fill both /); $frame->new_ttk__label( -text => "CHOSEN:", )->g_grid( -column => 0, -row => 0, ); $frame->new_ttk__label( -textvariable => \$chosen, )->g_grid( -column => 1, -row => 0, ); #~ tk_optionMenu pathName varName value ?value value ...? Tkx::tk___optionMenu( "$frame.crit", \$chosen, @fail_crit ); #~ Tkx::widget->new( "$frame.crit" )->g_grid(-column => 2, -row => + 0); Tkx::grid( "$frame.crit", -column => 2, -row => 0 ); } Tkx::i->interp->Eval(q{ttk::label .l2 -textvariable myVar; pack .l2}); Tkx::i->interp->Eval(q{tk_optionMenu .foo myVar Foo Bar Boo Spong Wibb +le}); Tkx::i->interp->Eval(q{pack .foo}); Tkx::MainLoop(); __END__ Tkx-1-0.0s-tkx-optionmenu.pl-21: winfo children . Tkx-2-0.0s-tkx-optionmenu.pl-21: ttk::frame .f Tkx-3-0.0s-tkx-optionmenu.pl-22: pack .f -expand 1 -fill both Tkx-4-0.0s-tkx-optionmenu.pl-24: winfo children .f Tkx-5-0.0s-tkx-optionmenu.pl-24: ttk::label .f.l -text CHOSEN: Tkx-6-0.0s-tkx-optionmenu.pl-24: grid .f.l -column 0 -row 0 Tkx-7-0.0s-tkx-optionmenu.pl-30: winfo children .f Tkx-8-0.0s-tkx-optionmenu.pl-30: ttk::label .f.l2 -textvariable SCALAR +(0x99ae24) Tkx-9-0.0s-tkx-optionmenu.pl-30: grid .f.l2 -column 1 -row 0 Tkx-10-0.0s-tkx-optionmenu.pl-37: tk_optionMenu .f.crit SCALAR(0x99ae2 +4) {1. Maximum Strain} {2. Maximum Stress} {3. Tsai-Hill} {4. Modifie +d Tsai-Wu} {5. Hoffman} Tkx-11-0.0s-tkx-optionmenu.pl-44: grid .f.crit -column 2 -row 0

In reply to Re^3: Tkx Optionmenu by Anonymous Monk
in thread Tkx Optionmenu by shortyfw06

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.