Solved

Property Editor that calls Component Editor?

Posted on 1998-01-02
1
196 Views
Last Modified: 2010-04-04
Hello,

How can I write/register property editor that does nothing but calls owner
component's editor? Just like Items property of TMainMenu component...?

Thanks.
0
Comment
Question by:_art_
1 Comment
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 100 total points
ID: 1355087
To get a property editor and a component editor to do the same thing, you need to write a common procedure that both editors call.

E.g.
procedure EditProp(MyComp: TMyComponent; ADesigner: TFormDesigner);
begin
  // Do something with the component...

  // Tell Delphi IDE that component has changed.
  ADesigner.Modified;
end;


The property editor's Edit method:
procedure TMyPropEditor.Edit;
begin
    EditProp(TMyComponent(GetComponent(0)), TFormDesigner(Designer));
end;


The component editor's ExecuteVerb method:
procedure TMyCompEditor.ExecuteVerb(Index: Integer);
begin
      case Index of
            0: EditProp(TMyComponent(Component), TFormDesigner(Designer));
      end;
end;


Regards,
JB
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question