EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OnDblClick event?

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Form Designer
View previous topic :: View next topic  
Author Message
aecspades



Joined: 04 Dec 2006
Posts: 14

PostPosted: Wed Jan 24, 2007 3:58 pm    Post subject: OnDblClick event? Reply with quote

Is there a way to trap a double-click event in FormDesigner? I would like to override the default function for certain control types, for example I would like to display the Chart editor when a TChart is double-clicked. It looks like FormDesigner always generates a "Control.OnClick" method for the control that was selected, eventually falling through to the OnGetScriptProc method. I could probably trap the OnMouseDown event and try to figure out what the selected control was by using X,Y coordinates but that seems cumbersome and still wouldn't 'stop' the "Control.OnClick" method from being created. I'm also unclear about the differences between the TzFormDesigner events and TDesignerEvents and when one should be used instead of the other (for example OnKeyPress exists in both?) .

Thanks for any help you can give
Back to top
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Thu Jan 25, 2007 2:35 am    Post subject: Reply with quote

1. You may process OnMouseDown. To disable processing in designer you should call Abort procedure.

2. When control is double clicked in designer, designer calls TComponentEditor.Edit for this control. As I understand you had registered TDefaultEditor. Ensure that TDefaultEditor is registered before other component editors (i.e. before loading packages - with runtime packages or before TeeChartReg.Register - without runtime packages).
If TDefaultEditor will be registered after other editors it will override them, so they will not be accessible.

3. Events in TDesignerEvents are fired for all designers. Events in TzFormDesigner are fired only for that designer.

Michael.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Form Designer All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group