TDBLookupListBox.DoSelectionChange procedure
Performs actions needed when the selected item in the listbox is changed.
Declaration
procedure DoSelectionChange(User: Boolean); overrideArguments
User | Indicates if the selection change is due to user interaction with the control. |
Description
DoSelectionChange is an overridden method in
TDBLookupListBox. It extends the inherited method to provide
support for the "unbound" usage model where either the
DataField
or the
DataSource is not defined for the control. This allows the
lookup dataset to be synchronized to the current item selection in the
listbox, but does not include storing the new value in the linked dataset.
User indicates if the selection change is a result of user
interaction with the listbox control, as opposed to a programmatic change
from methods or messages in the class. When both User and
IsUnbound are
True, the
UpdateData method is
called to reposition the lookup dataset to the new value for the control.
When User is True and IsUnbound is False, the internal
TFieldDataLink is notified of the new value by calling its
CanModify, Modified, and UpdateRecord
methods. If the linked dataset cannot be modified, the DataChange
method is called.
DoSelectionChange calls the inherited method prior to exit.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
