Class TTreeSelect (unit dbTreeCBox) |
Inherits from
TForm
Options:
dtAcceptLeavesOnly:
The User can only select nodes that have no children.
If you use the event OnAcceptNode, Accept is set to false if the
node has children. But you can accept the node anyway by setting
Accept to true.
dtDontAcceptRoot:
The User can not select the root-node.
If you use the event OnAcceptNode, Accept is set to false if the
node is the root-node. But you can accept the node anyway by setting
Accept to true.
dtKeepDataSetConnected:
The DataSource TDbTreeLookupComboBox.ListSource or the LookupDataSet
of TDbTreeLookupComboBox.ListField will be always connected to the
TDBTreeView of the dropdown-panel. If you set dtKeepDataSetConnected
to false, a complete rebuild of the tree is needed before each dropdown.
constructor Create(AOwner: TComponent);
- TTreeSelect ----------------------------------------------------------------
function CanAccept(Node: TTreeNode): Boolean;
procedure CloseUp(Action: TCloseUpAction);
destructor Destroy;
load descendants with *.
procedure CreateParams(var Params: TCreateParams);
procedure Deactivate;
function GetDBTreeView: TCustomDBTreeView;
Avoid beep at CloseUp with enter-key pressed:
procedure KeyDown(var Key: Word; Shift: TShiftState);
procedure Loaded;
procedure OnDBTreeViewMouseSelect(Sender: TObject);
SortType := stNone; recommended, but default
procedure SetDBTreeView(Value: TCustomDBTreeView);
else
MessageBeep(MB_ICONEXCLAMATION); {
property CallingDbTreeLookupComboBox : TDbTreeLookupComboBox
property DBTreeView : TCustomDBTreeView
property PosUnderComboBox : Boolean
event OnCloseUp : TCloseUpEvent
event OnAcceptNode : TAcceptNodeEvent
FCallingDbTreeLookupComboBox : TDbTreeLookupComboBox;
FDBTreeView : TCustomDBTreeView;
FDBTreeViewSelfCreated : Boolean;
FOldOnDBTreeViewMouseSelect : TNotifyEvent;
FOnAcceptNode : TAcceptNodeEvent;
FOnCloseUp : TCloseUpEvent;
FPosUnderComboBox : Boolean;
true: We will destroy it at end
constructor Create(AOwner: TComponent);
TTreeSelect ----------------------------------------------------------------
function CanAccept(Node: TTreeNode): Boolean;
procedure CloseUp(Action: TCloseUpAction);
destructor Destroy;
load descendants with *.dfm
procedure CreateParams(var Params: TCreateParams);
procedure Deactivate;
function GetDBTreeView: TCustomDBTreeView;
Avoid beep at CloseUp with enter-key pressed:
procedure KeyDown(var Key: Word; Shift: TShiftState);
procedure Loaded;
procedure OnDBTreeViewMouseSelect(Sender: TObject);
SortType := stNone; recommended, but default
procedure SetDBTreeView(Value: TCustomDBTreeView);
else
MessageBeep(MB_ICONEXCLAMATION); {
property CallingDbTreeLookupComboBox : TDbTreeLookupComboBox
property DBTreeView : TCustomDBTreeView
property PosUnderComboBox : Boolean
event OnCloseUp : TCloseUpEvent
event OnAcceptNode : TAcceptNodeEvent
FCallingDbTreeLookupComboBox : TDbTreeLookupComboBox;
FDBTreeView : TCustomDBTreeView;
FDBTreeViewSelfCreated : Boolean;
FOldOnDBTreeViewMouseSelect : TNotifyEvent;
FOnAcceptNode : TAcceptNodeEvent;
FOnCloseUp : TCloseUpEvent;
FPosUnderComboBox : Boolean;
true: We will destroy it at end