Link to home
Start Free TrialLog in
Avatar of Avataris
Avataris

asked on

How to Create a DB component with FIELD selector

Hi, I want to create a DB component where I select the Datasource. That works correctly, but when I want to select the FIELD (TFIELD) I get a list of ALL fields. I only want to have the fields from the source I've selected in the object inspector.

Anyone knows How?
ASKER CERTIFIED SOLUTION
Avatar of TOndrej
TOndrej

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Avataris
Avataris

ASKER

Yes the property is declared like that, I want to have a combobox with the fields from the table in the property editor.
I don't have a DBREG anything :(
Please show me the exact declaration and get/set methods and the internal field declaration.
But I think i get your point :)
I'll test it now.
I have it in <delphidir>\Source\Property Editors\dbreg.pas
(Delphi 5 Enterprise)
Thanx, this method :

RegisterPropertyEditor(TypeInfo(string), TComponent, 'DataField', TDataFieldProperty);


Is all I needed :)
It's strange that you needed it.

Anyway... You don't seem to be interested in a complete solution. Good luck.
Thanx, this method :

RegisterPropertyEditor(TypeInfo(string), TComponent, 'DataField', TDataFieldProperty);


Is all I needed :)
I don't have Delphi 5, just Delphi 4.
Delphi 4 has no examples about the subject.
Complete solutions take the fun of programming away ;)

But my component works fine now :)
Thanks!