Hi,
I am trying to print a text in the status bar for each menu item, including
the menu items that have submenus, but for those items I can't do it.
For the common menu items (button, radio or checkboxes), the text is printed
well in the status bar.
I have tried something like:
#define the menu
$self->{OptionsMenu} = Wx::Menu->new();
#Define the submenu
$self->{CautaDiaMenu} = Wx::Menu->new();
#then append some items to that menu
$self->{CautaDia1} = $self->{CautaDiaMenu}->AppendRadioItem(-1, "Caută doar
cu diacritice");
#Append the submenu to its parent menu
$self->{OptionsMenu}->Append(-1, "When searching with special chars",
$self->{CautaDiaMenu});
#handle the event
EVT_MENU_HIGHLIGHT($self, $self->{CautaDiaMenu},
sub{$_[0]->{StatusBar}->SetStatusText("...")});
But nothing happens when selecting that menu item.
So I have also tried to get the result of the Append method:
$self->{CautaDia} = $self->{OptionsMenu}->Append(-1, "When searching with
special chars", $self->{CautaDiaMenu});
and
EVT_MENU_HIGHLIGHT($self, $self->{CautaDia},
sub{$_[0]->{StatusBar}->SetStatusText("...")});
But it doesn't work either.
Please tell me what I am doing wrong.
Is it possible to print texts in the status bar when selecting the menus
that have submenus?
Thank you.
Octavian