What's the problem with this code? I'm trying to get a combobox to run
an event subroutine. Is there another event I should be considering? From
the documnetation I've seen there are but three asscoiated with a combobox;
GotFocus, LostFocus, and Change.

I'm using Activestate perl build 5.8.0 build 806, and Win32-GUI-PPM-5.8 I
retrieved  from Sourceforge.

Thanks in advance for any help you can give!

Jamie
-------------------
use Win32::GUI;
$Main = Win32::GUI::Window->new(
        -name   => 'Main',
        -width  => 350,
        -height => 200,
        -text   => 'Pick a name'
                );
$NameList = Win32::GUI::Combobox->new(
        $Main,
        -top    => 40,
        -left   => 15,
        -style  => WS_VISIBLE | 3 | WS_VSCROLL | WS_TABSTOP,
        -width  => 300,
        -height => 160,
        );

$NameList->Add("Billy","David","Kevin","Ross");

sub NameList_GotFocus {
        print STDOUT "GotFocus Event...\n";
}
sub NameList_LostFocus {
        print STDOUT "LostFocus Event...\n";
}
sub NameList_Change {
        print STDOUT "Change Event...\n";
}
$Main->Show();
Win32::GUI::Dialog();
sub Main_Terminate {
        -1;
}


Reply via email to