lcl: DBLookupComboBox, DBLookupListBox: update Lookup on handle destroy. Issue #31486

git-svn-id: trunk@54441 -
This commit is contained in:
ondrej 2017-03-18 09:20:06 +00:00
parent 95f94e25d1
commit cd7fd1bc6e
3 changed files with 16 additions and 0 deletions

View File

@ -450,6 +450,7 @@ Type
procedure DataChange(Sender: TObject); override;
procedure DoSelectionChange(User: Boolean); override;
procedure InitializeWnd; override;
procedure DestroyWnd; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure Loaded; override;
procedure UpdateData(Sender: TObject); override;
@ -799,6 +800,7 @@ Type
protected
procedure CloseUp; override;
procedure InitializeWnd; override;
procedure DestroyWnd; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure Loaded; override;
procedure UpdateData(Sender: TObject); override;

View File

@ -57,6 +57,13 @@ begin
Text := '';
end;
procedure TDBLookupComboBox.DestroyWnd;
begin
inherited;
//after handle destroy Items address changes
FLookup.ControlItems := Items;
end;
procedure TDBLookupComboBox.Select;
begin
FDataLink.UpdateData;

View File

@ -44,6 +44,13 @@ begin
ItemIndex := -1;
end;
procedure TDBLookupListBox.DestroyWnd;
begin
inherited;
//after handle destroy Items address changes
FLookup.ControlItems := Items;
end;
procedure TDBLookupListBox.DoSelectionChange(User: Boolean);
begin
if User then