EControl Form Designer Pro
TzFormDesigner.OnGetMethodNames Property

Occurs when method property editor requests designer for possible method names.

property OnGetMethodNames: TGetMethodNamesEvent;

Write this handler to specify possible procedure names that can be assigned to the selected in object inspector event. 

Use TypeData to filter possible procedures, for example, by procedure parameters. Call Proc for each possible procedure. 

This event is intended for integration with external script engines.

OnGetScriptProc, OnSetScriptProc, OnShowMethod, OnRenameMethod

This example shows using of the event. EControl Syntax Editor SDK is used as source code analyzer

procedure TForm4.zFormDesigner1GetMethodNames(Sender: TObject;
  TypeData: PTypeData; Proc: TGetStrProc);
var i: integer;
    R: TTagBlockCondition;
   with CodeEditor.SyntObj do
      // Looking for all text ranges with rule "function"
      R := TTagBlockCondition(Owner.BlockRules.ItemByName('function'));
      if R <> nil then
       for i := 0 to RangeCount - 1 do
        if (Ranges[i].Rule = R) then
         Proc(TagStr[Ranges[i].StartIdx + 1]); // Adds function to procedures list
Copyright (c) 2004 - 2011 EControl Ltd.. All rights reserved.
What do you think about this topic? Send feedback!