Thanks!
-- John Wiersba
Depending on how you used it, there is the tk_messageBox (called as
Tkx::tk___messageBox in translation), or tk_dialog
(Tkx::tk___dialog). There are also other megawidgets that support
more dialog shell style behavior (Tkx::package_require
('widget::dialog'); $mw->new_widget__dialog(...) ...) that could use
more docs.
Jeff
Thanks, Jeff. I looked at ___messageBox and ___dialog, but couldn't
seem to get them to do what I want (see below).
If the megawidgets don't have docs, can I find the (hopefully, perl)
source for them somewhere under INSTALLDIR/lib? (Unfortunately, I
don't have perl 5.10 installed anymore to do a search, because I had
to reinstall perl 5.8 to get my code working again -- apparently both
perl 5.8 and perl 5.10 can't coexist on a windows pc).
What I'm doing in my perl 5.8 code is like this:
my $db = $mw->DialogBox(
-title => $title,
-buttons => [ "OK", "Cancel" ],
-default_button => "OK",
);
my $f = $db->add( "Frame" );
...
$f->pack;
my $answer = $db->Show();
if ($ans !~ /ok/i) ...
-- John
This would translate to:
Tkx::package_require('widget::dialog');
my $db = $mw->new_widget__dialog(
-title => $title,
-type => "okcancel",
-modal => "local",
-parent => $mw,
-padding => 10,
-synchronous => 1,
);
$d->g_bind('<Key-Return>', sub { $d->close('ok'); });
my $f = $d->getframe();
... # pack things into $f
my $answer = $db->display;
if ($answer ne "ok") ...
and there are no docs for this widget except in source. :-/ Source
view of original Tcl code is at:
http://tcllib.cvs.sourceforge.net/viewvc/tcllib/tklib/modules/widget/dialog.tcl?view=markup
Jeff
Thanks, Jeff -- I don't know how I would have figured that out
myself! It looks like it's going to be somewhat painful to do a
complete port to Tkx and since I have to get this working right away,
it looks like I'm temporarily stuck at ActivePerl 5.8. When I get a
little more time I will look into this more deeply.
-- John
What platform are you on? There are perl/Tk ppms for Windows
available.
Why you didn't install Tk.
ppm install Tk