Hi list,
I have a ScrolledWindow inside a Notebook. When I press CTRL + PageUp (or PageDown), the window intercepts these events and performs horizontal scrolling. I want to override this so that the events reach the Notebook instead, which would process them as a page change.
How do I override this default behavior of CTRL+PageUp so that it reaches the parent Notebook? I tried adding CTRL + PageUp to my ScrolledWindow’s accelerator table but it didn’t work.
Thanks!
I’d start with catching EVT_CHAR or one of the other keyboard events, then pass it manually to the notebook using something like PostEvent, without Skip()-ing the event (so the ScrolledWindow doesn’t ever see it):
···
On Tuesday, February 17, 2015 at 4:07:01 PM UTC-8, Leonardo Torres wrote:
Hi list,
I have a ScrolledWindow inside a Notebook. When I press CTRL + PageUp (or PageDown), the window intercepts these events and performs horizontal scrolling. I want to override this so that the events reach the Notebook instead, which would process them as a page change.
How do I override this default behavior of CTRL+PageUp so that it reaches the parent Notebook? I tried adding CTRL + PageUp to my ScrolledWindow’s accelerator table but it didn’t work.
Thanks!
Thank you, even though I would have liked something less hacky, that works.
···
On Wed, Feb 18, 2015 at 1:50 PM, Nathan McCorkle nmz787@gmail.com wrote:
I’d start with catching EVT_CHAR or one of the other keyboard events, then pass it manually to the notebook using something like PostEvent, without Skip()-ing the event (so the ScrolledWindow doesn’t ever see it):
http://stackoverflow.com/a/23203785/253127
On Tuesday, February 17, 2015 at 4:07:01 PM UTC-8, Leonardo Torres wrote:
Hi list,
I have a ScrolledWindow inside a Notebook. When I press CTRL + PageUp (or PageDown), the window intercepts these events and performs horizontal scrolling. I want to override this so that the events reach the Notebook instead, which would process them as a page change.
How do I override this default behavior of CTRL+PageUp so that it reaches the parent Notebook? I tried adding CTRL + PageUp to my ScrolledWindow’s accelerator table but it didn’t work.
Thanks!