in reply to Binding an action to an item in a Listbox
As you can see, it's very easy to change the title of a window -- just use the title() method. As for changing the value of that field, use the configure() method on it, changing the text field to the value you want. configure takes similar arguments to the constructor.use Tk; my $main = MainWindow->new; $main->Button(-text => 'Redo', -command => sub{$main->title('Moo');})- +>pack; MainLoop;
|
|---|