in reply to Binding an action to an item in a Listbox

Here's a simple script that has a button that changes the main window's title
use Tk; my $main = MainWindow->new; $main->Button(-text => 'Redo', -command => sub{$main->title('Moo');})- +>pack; MainLoop;
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.