Solved

Property Editor that calls Component Editor?

Posted on 1998-01-02
1
198 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 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