Delete Button in SimpleGraph

Please discuss general Delphi programming topics here.

Delete Button in SimpleGraph

Postby stefano4jc » March 26th, 2012, 2:48 pm

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
stefano4jc
Member
Member
 
Posts: 1
Joined: March 26th, 2012, 2:38 pm

Re: Delete Button in SimpleGraph

Postby ASH » March 27th, 2012, 5:39 pm

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.
Amir
User avatar
ASH
Member
Member
 
Posts: 1
Joined: March 24th, 2012, 9:32 pm
Location: Iran

Re: Delete Button in SimpleGraph

Postby Kambiz » May 9th, 2012, 12:17 am

Amir is right. In other hand, you may try OnKeyDown event.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron