Sorry about the misunderstanding. This is just one package from the code. There is a little more. I can post all of it if you would like. You will have trouble running it without my database.
The code for the event handler looks like this:
sub Combobox1action {
my( $self, $event ) = @_;
$self->SetTitle( 'Combo box selected' );
}
It appears that $self and $event are the only parameters contained in @_. Unfortunately, I cannot seem to access the GetValue() method(?) through either of these. From the limited wxPerl documentation, GetValue() is supposed to return the selected item in the combo box. I can't get that to happen. Neither $self->GetValue(), nor $event->GetValue() is recognized.
| [reply] [d/l] |
sub Combobox1action {
my( $self, $event ) = @_;
print $self, "\n";
$self->SetTitle( 'Combo box selected' );
}
If $self prints out to be a WxWidget Combobox, your code should work. But if $self turns out to be the package you are holding your code in, MyFrame, a WxWidget frame, then you will need to find a way of clearly identifying the Combobox.
| [reply] [d/l] |
When I print $self and $event, I get the following output:
MyFrame=HASH(0x190ac84) Wx::CommandEvent=SCALAR(0x190aec4)
The first value is the value of $self, the second is that of $event.
| [reply] |