Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to capture KeyDown event on Flowchart box? (Read 3221 times)
bitbit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Apr 15th, 2010
How to capture KeyDown event on Flowchart box?
Apr 15th, 2010 at 9:49am
Print Post  
Hi,
I would like to capture 'Ctrl + C' event after a user clicks to rename a flow chart box. How do I capture events on a fcBox?
I can capture keydown event for a map:
this.fcMap.KeyUp += new System.Windows.Forms.KeyEventHandler(this.fcMap_KeyUp);

But how about a flowchart box?

Thanks
BitByBit
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to capture KeyDown event on Flowchart box?
Reply #1 - Apr 15th, 2010 at 10:55am
Print Post  
Hi,

Handle the EnterInplaceEditMode event and add a handler to the event's EditControl argument.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
bitbit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Apr 15th, 2010
Re: How to capture KeyDown event on Flowchart box?
Reply #2 - Apr 15th, 2010 at 11:28am
Print Post  
Thanks for the reply but I am not understanding how to implement your suggestion.
Could you provide me with a code snippet please?
  
Back to top
 
IP Logged
 
bitbit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Apr 15th, 2010
Re: How to capture KeyDown event on Flowchart box?
Reply #3 - Apr 15th, 2010 at 11:39am
Print Post  
Hi Stoyo

I have created this method:
fcMap_EnterInplaceEditMode(object sender, InplaceEditArgs e)

Now, e has Item and TextBox as its properties. What should I do?
Should I catch e.TextBox's keydown event?
If yes, how can I do that?

Sorry for too many questions but I am desperate for the solution.

Hope you will bail me out!

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to capture KeyDown event on Flowchart box?
Reply #4 - Apr 15th, 2010 at 1:04pm
Print Post  
Hi,

Yes, add a handler to the TextBox control:

e.TextBox.KeyDown += new KeyEventHandler(this.fcMap_KeyUp);

We have renamed it to EditControl in recent versions, because now you can use other controls instead of TextBoxes.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint