Re: [wxVTK] wxVTK + GTK + EVT_CHAR
Brought to you by:
malat
From: Nigel N. <Nig...@au...> - 2008-05-24 15:36:40
|
Hello Quoc Cuong and Mathieu, On Sat, May 24, 2008 at 3:58 PM, <Quo...@ce...> wrote: > I am using wxVTK 1.2 with GTK2 under linux (FC8). > My wxVTKRenderWindowInteractor is embedded in a wxScrolledWindow > (child of a frame). I can intercept mouse events but the EVT_CHAR > is never sent. Has anybody experienced this problem? I'm using wxVTKRenderWindowInteractor 1.36 (WinXP, VC++2005) Date: $Date: 2008/04/14 15:12:00 $ Version: $Revision: 1.36 $ with wx v.2.8.7. I have a single wxVTK window in a wxAUI docking frame layout. I too found that OnChar() was not getting passed through to the wxVTKRWI, but that OnKeyDown() was working fine. A quick fix for me was to handle the char event in OnKeyDown(). I invoke a CharEvent after the KeyPressEvent (near line 485): InvokeEvent(vtkCommand::KeyPressEvent, NULL); InvokeEvent(vtkCommand::CharEvent, NULL); // <--- added This fixes the problem for my current case. Also noticed an issue with small offset to the vertical "y" pick position. When I get a moment I'll try to track that down. Nigel -- ------------------------------------------------------------------------------------- Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender. ------------------------------------------------------------------------------------- |