Emmanuel, It's just a typo in the button definition. Add a comma at the end of the line:
-left => 360 And it will work. Glenn -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel E Sent: Thursday, 21 July, 2005 06:00 To: perl-win32-gui-users@lists.sourceforge.net Subject: [perl-win32-gui-users] Can anyone tell me why tabbing works on the textfields but not onto the buttons? Hi Everyone, In the following peice of code I can tab through the textfields but not onto the buttons. Ive tried -tabstop, -ok, -default -dialogui in various combinations however nothing seems to move focus onto the button called start. --------- use Win32::GUI; use Win32::Process; use Win32; my $font = Win32::GUI::Font->new( -name => "Courier New", -size => 16, ); my $windowstatus = 1; #1 if window is visible. 0 if hidden; my $justify = 72; my $window = new Win32::GUI::Window( -name => "Window", -title => "Welcome to SSL Proxy!", -left => 100, -top => 100, -width => 810, -height => 300, -font => $font, ); $window->{-dialogui} =1; $window->AddTextfield( -name => "LocalProxyName", -left => 20, -top => 10, -width => 200, -height => 20, -text => 'localhost', -prompt => "Please enter Name or IP to bind to (Optional, Defaults to localhost): "." "x($justify-length("Please enter Name or IP to bind to (Optional, Defaults to localhost): ")), -tabstop => 1, ); $window->AddTextfield( -name => "LocalProxyPort", -left => 20, -top => 30, -width => 200, -height => 20, -text => '8080', -prompt => "Please enter Port to bind to (Optional, Defaults to 8080): "." "x($justify-length('Please enter Port to bind to (Optional, Defaults to 8080): ')), -tabstop => 1, ); $window->AddButton( -name => "Start", -align => "center", -height => 30, -width => 60, -text => "Start", -top => 200, -left => 360 -tabstop => 1, -default => 1, #-ok => 1, ); $window->AddButton( -name => "Stop", -align => "center", -height => 30, -width => 60, -text => "Stop", -top => 200, -left => 360, -tabstop => 1, #-default => 1, ); $window->{'Stop'}->Hide; $window->{'Start'}->Show; #my $icon = new Win32::GUI::Icon('MSN.ICO'); #my $ni = $window->AddNotifyIcon(-name => "NI", -id => 1, -icon => $icon, -tip => "SSLProxy - Click to Show/Hide"); my $processstatus = 0; # 1 if process has been spawned. my $processobj; $window->{'Start'}->SetFocus(); $window->Show; Win32::GUI::Dialog(); -------------------- Thanks, Emmanuel -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse fo?=r Mail, Message, More +++ ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users