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 f�r Mail, Message, More +++

