Solved

Property Editor that calls Component Editor?

Posted on 1998-01-02
1
190 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now