procedure Register;
implementation
procedure Register;
begin
RegisterComponents(`Samples` [TDBFieldComboBox]);
end;
constructor TDBFieldComboBoxcreate(Aowner:Tcomponent);
var Ij:integer;
begin
inherited Create(Aowner);
FDataLink:=TFieldDataLinkCreate ;
ondropdown:=dropdown;
text:=``;
end;
destructor TDBFieldComboBoxDestroy;
begin
FDataLinkFree ;
inherited Destroy;
end;
function TListBoxGetField:string;
var
Ij:integer;
begin
j:=FDataLinkDataSourceDataSet FieldCount ;
for I := to j- do
begin
if FDataLinkDataSourceDataSetFields[I]Displayname=text then
begin
Result:=FDataLinkDataSourceDataSetFields[I]FieldName;
exit;
end;
end;
end;
procedure TDBFieldComboBoxSetDataSource ( Value:TDataSource);
begin
FDataLinkDataSource :=value;
end;
function TDBFieldComboBoxGetDataSource :TDataSource;
begin
Result:=FDataLinkDataSource ;
end;
procedure TDBFieldComboBoxStartDrag(Sender: Tobject; var DragObject: TDragObject);
begin
end;
procedure TDBFieldComboBoxDropDown(Sender: Tobject);
var
Ij:integer;
begin
j:=;
j:=FDataLinkDataSourceDataSet FieldCount;
I:=;
repeat
itemsAdd (FDataLinkDataSetFields[I]DisplayName );//FieldName);
I:=I+;
until I>j-;
end;
end
[] [] []