From: Mattia B. \<mattia\.barbon\@libero\.it\> <mat...@li...> - 2006-05-02 19:10:42
|
Hi, > Problem is, that I'm using the right mouse button to show a Popupmenu > for the Page, if I click on a Tab. But if I click on a Tab, that isnt > the the current Page, I want to change the Page, to this one first. I suppose you already tried to call SetSelection in the event handler? > So far I tried to use this in the Event Handler for the right button: > > my $hEvent =3D Wx::MouseEvent->new(wxEVT_LEFT_DOWN); > $hEvent->SetId($this->GetId()); > $this->ProcessEvent($hEvent); > > , but without any luck. Even if it worked now, it is not guaranteed to work in the future. In general, synthesizing events and making controls process them is a bad idea. > And since HitTest isnt implemented under wxPerl (and not on all > wxWidgets Ports), I cant determine on which tab the right click was. I added it to wxPerl CVS, FWIW. > Btw: What is the difference between wxWidgets "univ" and "generic" ? Generic is a widget implemented entirely using wxWidgets code (for example wxCalendarCtrl). Univ stands for wxUniversal and is a wxWidgets port (like wxMSW, wxGTK, wxMac,= ...) except it only relies on basic primitives (device context, window) and implements all the controls in a generic way. It is used in wxMGL. Regards Mattia |