Occurs when method property editor ask for script procedure name associated with a given property.
property OnGetScriptProc: TGetScriptProcEvent;
Write this event handler to return procedure name associated with property pInfo^.Name of object Instance.
OnGetMethodNames, OnSetScriptProc, OnShowMethod, OnRenameMethod
In this sample associations of script procedures and properties are stores in TStrings object (property Items in list box EventsList) with items - <ObjectName>.<PropertyName>=<ScriptProcedure>
procedure TForm4.zFormDesigner1GetScriptProc(Sender, Instance: TObject;
pInfo: PPropInfo; var ProcName: String);
begin
ProcName := '';
if Instance is TComponent then
if zFormDesigner1.Root = Instance then
ProcName := EventsList.Items.Values[PInfo^.Name]
else
ProcName := EventsList.Items.Values[(Instance as TComponent).Name + '.' + PInfo^.Name];
end;|
Copyright (c) 2004 - 2011 EControl Ltd.. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|