David,
Here is an example:
use Win32::GUI;
my $screen_width =
Win32::GUI::GetSystemMetrics(0); ## gets current screen width
my $screen_height = Win32::GUI::GetSystemMetrics(1); ## gets screen height my $minwidth = 600; ## width I want the window to start at my $minheight = 240; ## height I want the window to start at $DataWindow = new
Win32::GUI::Window(
-name => "DataWindow", -top => ($screen_height - $minheight)/2, ## center window vertically -left => ($screen_width - $minwidth)/2, ## center window horizontally -width => $minwidth, -height => $minheight, -title => "Fruit Chooser", ); $DataWindow->AddLabel(
-name => "Combo_Label", -text => "Fruit: ", -top => 55, -left => 25, -visible=> 0, ); $FruitList =
$DataWindow->AddCombobox(
-name => "Dropdown", -top => 52, -left => 90, -width => 120, -height => 110, -tabstop=> 1, -style => WS_VISIBLE | 3 | WS_VSCROLL | WS_TABSTOP, ); $FruitList ->InsertItem("apple");
$FruitList ->InsertItem("banana"); $FruitList ->InsertItem("cantaloupe"); $FruitList ->InsertItem("grapes"); $FruitList ->InsertItem("orange"); $FruitList ->InsertItem("pear"); $FruitList ->InsertItem("star fruit"); sub Dropdown_Change {
$FruitList->Text($FruitList->GetString($FruitList->SelectedItem)); } Jonathan
--------------------------------------------------------------
Jonathan Southwick [EMAIL PROTECTED] Technical and Network Services Allegheny College Meadville, PA 16335 814-332-2755
|
- [perl-win32-gui] Roberto Guerra
- [perl-win32-gui] Kuo David
- [perl-win32-gui] Jonathan Southwick
- [perl-win32-gui] Joel Oliveira