treecombobox OnDropDown event
Previous  Top  Next
Applies to
tcTreeComboBox component.  

Declaration
property OnDropDown: TNotifyEvent;  

Description
The OnDropDown event occurs when the user clicks the combo box (or its button at the right side), and the drop-down window with tree nodes is about to appear on screen.  
 
Write the OnDropDown event handler to perform some specific actions (for example, resize the drop-down window) before the tree nodes appears on screen.  
 
tip If you need to take some actions when the drop-down window already on screen — write OnAfterDropDown event handler.  

Example (demonstrates how to change the width of drop-down window in OnDropDown event handler)
procedure TForm1.tcTreeComboBox1DropDown(Sender: TObject);  
begin  
  tcTreeComboBox1.DropDownWidth := Random(200) + 20;  
  // also you can expand some nodes of embedded TreeView  
  tcTreeComboBox1.TreeView.FullExpand;  
end;  

See also
OnAfterDropDown and OnCloseUp events;  
DropDownWidth, TreeOptions and TreeView properties.