You can associate widgets with variables, and they'll take on the value of that variable.
You probably need something like a LabEntry or an Entry widget (depending on what you're doing with it) - and you'd use it something like this:
my $mw = new MainWindow();
my $text = "This is an entry box";
$entry = $mw->Entry(-textvariable => \$text)->pack();
That'll give you a text entry box, containing the text in $text, and allow you to change the text. Anything the user enters will automatically be stored in the $text variable.
Hope that helps.
-- Foxcub
#include www.liquidfusion.org.uk
Edit: Corrections/clarifications. |