Page 1 of 1

Delete Button in SimpleGraph

PostPosted: March 26th, 2012, 2:48 pm
by stefano4jc
I Downloaded the simplegraph editor demo. Then Im making some changes just for fun, for example, I would like to handle my self the Delete Button or VK_DELETE. When I use the OnKeyPress function in the SimpleGraph component, I realize that I can handle every single key!!! BUT the Delete button!, I am kinda frustrated ](*,) because I dont know what is going on, besides this works for me in any other program but here I cant handle this Delete button. Does anybody have an Idea about what is going on?

Thanks a lot! :-({|=

Stefano

Re: Delete Button in SimpleGraph

PostPosted: March 27th, 2012, 5:39 pm
by ASH
Hi Stefano,

I have not used TSimpleGraph, but according to ur description, the SimpleGraph component might trigger Key Pressing event internally, before it elevates to the upper level of OnKeyPress (which u are using...), so u can take a look at the TSimpleGraph source code to catch it; and if is so, u can drive a class from TSimpleGraph and override the KeyPress method to manage the behavior of class as u wish.

Re: Delete Button in SimpleGraph

PostPosted: May 9th, 2012, 12:17 am
by Kambiz
Amir is right. In other hand, you may try OnKeyDown event.