On 28/06/07, Jacques Choquette XX (QB/EMC)
<[EMAIL PROTECTED]> wrote:
I am trying to see the first item in the list that I have built for a
combobox. When I run the script, the combobox is there but I cannot
see the item like 'info'. What am I doing wrong? I am using Perl 5.8 on
Windows 2000
$Window->AddCombobox(
-name => "CB",
-dropdown => 1,
-left => 50,
-top => 100,
-height => 80,
-width => 80,
-hasstring => 1,
-onChange => \&GetInfoCB,
-tabstop => 1,
# -uppercase => 1,
# -sort => 1,
);
$Window->CB->Add('none', 'info', 'warning', 'error');
$Window->CB->SetTopIndex('1');
$Window->CB->TopIndex('1');
$Window->CB->FirstVisibleItem('1');
Try this.
#!perl -w
use strict;
use warnings;
use Win32::GUI qw(CW_USEDEFAULT);
my $mw = Win32::GUI::Window->new(
-left => CW_USEDEFAULT,
-size => [400,300],
);
$mw->AddCombobox(
-name => "CB",
-dropdown => 1,
-left => 50,
-top => 100,
-height => 80,
-width => 80,
);
$mw->CB->Add('none', 'info', 'warning', 'error');
$mw->CB->SetCurSel(0);
$mw->Show();
Win32::GUI::Dialog();
$mw->Hide();
exit(0);
__END__
Regards,
Rob.