Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Component property editor

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi there.
Does anyone know about examples and/or documents about writing property editors without using DegignIntF?



[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
Sorry mate - I was wrong when I specified my problem.
Here is the real problem:

I want to build a component (Combobox) with filter capabilities. To make it easy I want to store the data in a TList like this (I have simplified the class structure for this post):

Code:
TComboItem = class
  Visible: Boolean;
  Text: String;
  Data: TObject
end;

TComboList = class // Should the list be inherited from TList instead?
  FList: TList; // List of TComboItem
end;

TMyCombo = class
published
  Items: TComboList read FComboList;
end;

I want to do a Designtime Propertyeditor for this TComboList object - How should i proceed?

I'm using Delphi 7



[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
Yeas, I have also read these.

When I add the DesignIntF unit, in my component unit, I always get the error that the compiler can't find the unit.

Do I have to add the ToolsAPI directory in my Librarypath?

[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
I'm examining in the Toolbar200 componentpack ( and in one unit, the uses clause are contructed like this:

Code:
uses
  Windows, SysUtils, Classes, Graphics, Controls, Dialogs, ActnList, ImgList,
  [b]{$IFDEF JR_D6}[/b] DesignIntf, DesignEditors, VCLEditors, [b]{$ELSE}[/b] DsgnIntf, [b]{$ENDIF}[/b]
  TB2Toolbar, TB2ToolWindow, TB2Dock, TB2Item, TB2ExtItems, TB2MRU, TB2MDI,
  TB2DsgnItemEditor;

When I try to add the same units (DesignIntf/DsgnIntf) the project doesnt compile.

[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
Nordlund,

you'll need to make a package for your component.

- add DesignIntF and DesignEditors to the property editor unit.
- make sure that design time package is checked in the package options.
- add DesignIDE unit in the package source file.

that should do it.

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top