* Put in edit state when selecting text in DBComboBox. Fix #20477

git-svn-id: trunk@32867 -
This commit is contained in:
blikblum 2011-10-13 07:08:51 +00:00
parent 92e8c1695c
commit 4f339b94c0
2 changed files with 12 additions and 1 deletions

View File

@ -675,8 +675,9 @@ Type
TDBComboBox = class(TCustomDBComboBox)
protected
procedure UpdateData(Sender: TObject); override;
procedure DataChange(Sender: TObject); override;
procedure Select; override;
procedure UpdateData(Sender: TObject); override;
published
property Anchors;
property ArrowKeysTraverseList;

View File

@ -18,6 +18,16 @@
{ TDBComboBox }
procedure TDBComboBox.Select;
begin
//avoid reseting text when calling select
FDataLink.OnDataChange := nil;
FDataLink.Edit;
FDataLink.Modified;
FDataLink.OnDataChange := @DataChange;
inherited Select;
end;
procedure TDBComboBox.UpdateData(Sender: TObject);
begin
FDataLink.Field.Text := Text;