 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Joe Hatem Guest
|
Posted: Mon Aug 11, 2003 11:10 am Post subject: Re: How to call TDBGridColumn Property Editor |
|
|
This probably worked fine with Delphi 5.
What is the equivalent for Delphi 6 ?
Thanks.
_____________________________________________
On Mon, 25 Feb 2002 "serge gubenko" <serge_gubenko (AT) yahoo (DOT) com> wrote:
| Quote: | TDBGridColumnsProperty is a property editor for dbgrid's columns. It is
somewhere in the DCLDB50 package, and not exported, so you can't use it. But
the class of the columns editor form is public and you can use in order it
to build your own property editor for columns. Here's how you should manage
it:
1. Add Dbcolned and colnedit units to the uses clause of the unit with
future property editor.
2. Add dsnide50.dcp and dcldb50.dcp to the requires clause of the package.
3. Write new property editor. Here's the code:
_____________________________________________
TNewDBGridColumnsProperty = class(TCollectionProperty)
public
function GetEditorClass: TCollectionEditorClass; override;
end;
function TNewDBGridColumnsProperty.GetEditorClass: TCollectionEditorClass;
begin
Result:=Dbcolned.TDBGridColumnsEditor;
end;
____________________________________________
4. Register it in this way:
RegisterPropertyEditor(TypeInfo(TDBGridColumns), TYourComponent,
'Columns', TNewDBGridColumnsProperty);
Best regards, Serge Gubenko
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|