Print Page | Close Window

KeyBindings Events not firing.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=13528
Printed Date: 07 October 2024 at 4:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: KeyBindings Events not firing.
Posted By: Brian42
Subject: KeyBindings Events not firing.
Date Posted: 28 February 2009 at 2:41pm
I have a C# application, and I'm trying to get the KeyBinding events to fire.  Below is the code I'm using... However, I never see any of these events getting fired.  Is there any "trick" to this... Or is there a bug.

Thanks in advance.

Brian
 
My code is
 

this.CommandBars.KeyBindings.BeforeTranslate += new XtremeCommandBars.IKeyBindingsEvents_BeforeTranslateEventHandler(KeyBindings_BeforeTranslate);

this.CommandBars.KeyBindings.BeforeRemove += new XtremeCommandBars.IKeyBindingsEvents_BeforeRemoveEventHandler(KeyBindings_BeforeRemove);

this.CommandBars.KeyBindings.BeforeAdd += new XtremeCommandBars.IKeyBindingsEvents_BeforeAddEventHandler(KeyBindings_BeforeAdd);

 

the event handlers are..

void KeyBindings_BeforeTranslate(int Command, ref object Cancel)

{

throw new NotImplementedException();

}

void KeyBindings_BeforeRemove(int fVirt, int Key, int Command, ref object Cancel)

{

throw new NotImplementedException();

}

void KeyBindings_BeforeAdd(int fVirt, int Key, int Command, ref object Cancel)

{

throw new NotImplementedException();

}




Replies:
Posted By: Oleg
Date Posted: 02 March 2009 at 12:35am
Hi,
 
First you need add form variable KeyBindings:
 
KeyBindings = this.CommandBars.KeyBindings;
 
These events fire when user change keybindings in customization dialog.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Brian42
Date Posted: 02 March 2009 at 10:10am
Thank you.  That did the trick.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net