treecombobox OnDropDown event
Return to Introduction  Previous page  Next page
Applies to
acTreeComboBox component.  

property OnDropDown: TNotifyEvent;  

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.acTreeComboBox1DropDown(Sender: TObject);  
  acTreeComboBox1.DropDownWidth := Random(200) + 20;  
  // also you can expand some nodes of embedded TreeView  

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