API:Vcl.DBCtrls.TDBLookupComboBox.OnCloseUp

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnCloseUp: TNotifyEvent read FOnCloseUp write FOnCloseUp;

C++

__property OnCloseUp;

Properties

Type Visibility Source Unit Parent
event published
Vcl.DBCtrls.pas
Vcl.DBCtrls.hpp
Vcl.DBCtrls TDBLookupComboBox

Description

Occurs immediately after an opened or "dropped-down" list is closed.

Vcl.DBCtrls.TDBLookupComboBox.OnCloseUp inherits from Vcl.DBCtrls.TCustomDBLookupComboBox.OnCloseUp. All content below this line refers to Vcl.DBCtrls.TCustomDBLookupComboBox.OnCloseUp.

Occurs immediately after an opened or "dropped-down" list is closed.

Write an OnCloseUp event handler to respond when the combo box list is closed. When the list is closed, the value that corresponds to the selected lookup value is assigned to the field. The list can be closed by the user or by calling the CloseUp method.

For a TDBLookupComboBox, the code should look like this:


procedure TForm1.DBLookupComboBox1CloseUp(Sender: TObject);
begin
StatusBar1.SimpleText := DBLookupComboBox1.Text;
end;


See Also