|
From: Jonathan S. <jso...@al...> - 2001-01-23 19:54:13
|
Erick,
No, actually I meant what I thyped:
$HostName ->Select(0);
It works for me.
Make sure you place that before your Win32::GUI::Dialog() call or =
somewhere where it will get called from a specific sub.
Try this short code and see if it works:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
use Win32::GUI;
my $screen_width =3D Win32::GUI::GetSystemMetrics(0);
my $screen_height =3D Win32::GUI::GetSystemMetrics(1);
my $minwidth =3D 620;
my $minheight =3D 255;
my $MainWindow =3D new Win32::GUI::Window(
-name =3D> "MainWindow",
-top =3D> ($screen_height - $minheight)/2,
-left =3D> ($screen_width - $minwidth)/2,
-width =3D> $minwidth,
-height =3D> $minheight,
-minsize=3D> [$minwidth,$minheight],
-title =3D> "Sample Window",
);
$HostName =3D $MainWindow->AddCombobox(
-name =3D> "HostName",
-tabstop =3D> 1,
-style =3D> WS_VISIBLE | 2 | WS_NOTIFY,
-left =3D> 205,
-top =3D> 10,
-width =3D> 110,
-height =3D> 160,
);
$HostName->InsertItem ("ftp.server1.com");
$HostName->InsertItem ("ftp.server2.com");
$MainWindow->Show();
$HostName->Select(0);
Win32::GUI::Dialog();
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Let me know if it still doesn't work for you.
Jonathan Southwick
Technical & Network Services
Allegheny College, Meadsville, PA
jso...@al...
----- Original Message -----=20
From: Erick J. Bourgeois=20
To: per...@li...=20
Sent: Tuesday, January 23, 2001 2:22 PM
Subject: [perl-win32-gui-users] Combobox
Johnathan,
Do you mean $HostName ->Select[0];
I tried both ways, both don't work.
erick
never stop questioning
www.jeb.ca
|