Hello. I'm writing a program that uses Wx::TreeListCtrl. I want to show context menu on right click. But event has coordinates (0,0), so context menu is shown in the incorrect place. Here is my code:
sub on_right_down { my $self = shift; my $event = shift; #Wx::TreeEvent my $menu = Wx::Menu->new(); $menu->Append( 71000, "New Reserved Section...", "" ); #if ($event->GetEventType == Wx::wxMouseEvent) { #} my $point = $event->GetPoint; print $point->x, $point->y,"\n"; $self->PopupMenu( $menu, $point->x, $point->y ); } Also, how can I use constants for GetEventType method? Wx::wxMouseEvent does not exist. -- Alexandr Ciornii, http://chorny.net