Thank you, this link was a great help. After some effort I got the example working. Here is my result (it may help successors):
use strict; use warnings; use Tkx; my $mw = Tkx::widget->new("."); Tkx::package_require('widget::dialog'); my $db = $mw->new_widget__dialog( -title => 'MyTitle', -type => "okcancel", -modal => "local", # -parent => $mw, # -padding => 10, -synchronous => 1, ); $db->g_bind('<Key-Return>', sub { $db->close('ok'); }); my $f = $db->getframe(); my $yearval = 2012; my $weekval = 16; my $sel_fr = $db->new_ttk__frame; my $ly = $sel_fr->new_ttk__label(-text => "Year"); my $lw = $sel_fr->new_ttk__label(-text => "Week"); my $y = $sel_fr->new_ttk__spinbox( -textvariable => \$yearval, -from => 2009, -to => 2014, ); my $w = $sel_fr->new_ttk__spinbox( -textvariable => \$weekval, -from => 1, -to => 53, ); $ly->g_grid(-row => 0, -column => 0); $lw->g_grid(-row => 1, -column => 0); $y->g_grid(-row => 0, -column => 1); $w->g_grid(-row => 1, -column => 1); $sel_fr->g_pack(-in => $f); my $answer = $db->display; if ($answer ne "ok") {exit};

This solution is acceptable, but not perfect. For some reason the dialog buttons stick to the right side of the window.

In the meantime I found an alternative at http://tktable.sourceforge.net/tile/doc/dialog.html. This module has more modern syntax (options instead of positional parameters), and also additional interesting options. Unfortunately I failed already at the 1st line, translating

package require ttk::dialog

from Tcl/Tk to Perl/Tkx. Hopefully one of you monks can help me along again.

Kind regards

GUIfriend


In reply to Re^2: [Tkx] Search for dialog box for text input by GUIfriend
in thread [Tkx] Search for dialog box for text input by GUIfriend

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.