| Class TTreeSelect (unit dbTreeCBox) |
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.
| Constructors |
constructor Create(AOwner: TComponent);| Functions |
function CanAccept(Node: TTreeNode): Boolean;
procedure CloseUp(Action: TCloseUpAction);
destructor Destroy;
procedure CreateParams(var Params: TCreateParams);
procedure Deactivate;
function GetDBTreeView: TCustomDBTreeView;
procedure KeyDown(var Key: Word; Shift: TShiftState);
procedure Loaded;
procedure OnDBTreeViewMouseSelect(Sender: TObject);
procedure SetDBTreeView(Value: TCustomDBTreeView);| Properties |
property CallingDbTreeLookupComboBox : TDbTreeLookupComboBox
property DBTreeView : TCustomDBTreeView
property PosUnderComboBox : Boolean| Events |
event OnCloseUp : TCloseUpEvent
event OnAcceptNode : TAcceptNodeEvent| Variables |
FCallingDbTreeLookupComboBox : TDbTreeLookupComboBox;
FDBTreeView : TCustomDBTreeView;
FDBTreeViewSelfCreated : Boolean;
FOldOnDBTreeViewMouseSelect : TNotifyEvent;
FOnAcceptNode : TAcceptNodeEvent;
FOnCloseUp : TCloseUpEvent;
FPosUnderComboBox : Boolean;| Constructors |
constructor Create(AOwner: TComponent);TTreeSelect ----------------------------------------------------------------
| Functions |
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); {
| Properties |
property CallingDbTreeLookupComboBox : TDbTreeLookupComboBox
property DBTreeView : TCustomDBTreeView
property PosUnderComboBox : Boolean| Events |
event OnCloseUp : TCloseUpEvent
event OnAcceptNode : TAcceptNodeEvent| Variables |
FCallingDbTreeLookupComboBox : TDbTreeLookupComboBox;
FDBTreeView : TCustomDBTreeView;
FDBTreeViewSelfCreated : Boolean;
FOldOnDBTreeViewMouseSelect : TNotifyEvent;
FOnAcceptNode : TAcceptNodeEvent;
FOnCloseUp : TCloseUpEvent;
FPosUnderComboBox : Boolean;true: We will destroy it at end