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:
=====================================
use Win32::GUI;
my $screen_width = Win32::GUI::GetSystemMetrics(0);
my $screen_height = Win32::GUI::GetSystemMetrics(1);
my $minwidth = 620;
my $minheight = 255;
my $MainWindow = new Win32::GUI::Window(
-name => "MainWindow",
-top => ($screen_height - $minheight)/2,
-left => ($screen_width - $minwidth)/2,
-width => $minwidth,
-height => $minheight,
-minsize=> [$minwidth,$minheight],
-title => "Sample Window",
);
$HostName = $MainWindow->AddCombobox(
-name => "HostName",
-tabstop => 1,
-style => WS_VISIBLE | 2 | WS_NOTIFY,
-left => 205,
-top => 10,
-width => 110,
-height => 160,
);
$HostName->InsertItem ("ftp.server1.com");
$HostName->InsertItem ("ftp.server2.com");
$MainWindow->Show();
$HostName->Select(0);
Win32::GUI::Dialog();
=============================================
Let me know if it still doesn't work for you.
Jonathan Southwick
Technical & Network Services
Allegheny College, Meadsville, PA
[EMAIL PROTECTED]
----- Original Message -----
From: Erick J. Bourgeois
To: [email protected]
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