Thanks .. That helped One more question ..
How do I retrieve the value form a text field to a variable ? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, 6. July 2007 12:19 PM To: Maxmelbin Neson (RBIN/EMT1) Subject: Re: [perl-win32-gui-users] How do I replace the text in atextfield in Win32::GUI /textfield Quoting "Maxmelbin Neson (RBIN/EMT1)" <[EMAIL PROTECTED]>: > Right now I do it like this ... > > $chkb = $main->AddTextfield( > -width => 100, > -height => 30, > -left => 100, > -top => 10, > -position => bottom, > -text => $sel3, > ); > > $sel3 = "new string"; > Is there a better way ? $chkb->Text($sel3); Working example: use strict; use Win32::GUI (); my $main = new Win32::GUI::Window ( -name => "Window", -title => "TekstFieldTest", -pos => [100, 100], -size => [400, 400], ) or die "new Window"; my $chkb = $main->AddTextfield( -width => 100, -height => 30, -left => 100, -top => 10, -text => "old", ); my $button= $main->AddButton( -text => 'Change', -size => [70,20], -pos => [$main->ScaleWidth()-156,$main->ScaleHeight()-25], -onClick => sub {$chkb->Text("New"); }, ); $main->Show(); Win32::GUI::Dialog();