Quote Originally Posted by Nouyana View Post
The Reason parameter in the ComboBeforeDropDown event is always FlexComboDropDownReasonInitialize. No matter if it was dropped down by mouse or keyboard or by code like the below one. By the way, what does the FlexComboDropDownReasonInitialize mean?

Code:
Private Sub Command1_Click()
   With VBFlexGrid1
      .Cell(FlexCellComboCue, .FixedRows, 1, .Rows - 1) = FlexComboCueDropDown
      .ColComboMode(1) = FlexComboModeDropDown
      .ColComboItems(1) = "Bob|Jack|Ivan"
      .Cell(FlexCellText, .FixedRows, 1, .Rows - 1) = "Bob"
      .StartEdit 1, 1
      .ComboButtonValue = FlexComboButtonValuePressed
      .EditText = "Jack"
      .CommitEdit
   End With
End Sub

Private Sub VBFlexGrid1_ComboBeforeDropDown( _
            ByVal Reason As FlexComboDropDownReasonConstants, _
                  Cancel As Boolean)
   Debug.Print "Reason: "; Reason    ' THIS ALWAYS RETURNS 1.
End Sub
FlexComboDropDownReasonInitialize is when the drop-down list (or calendar) automatically shows upon the .StartEdit.
This is the only way to suppress behavior by checking Reason for FlexComboDropDownReasonInitialize in the ComboBeforeDropDown event. This way it is possible to prevent auto drop-down.

The following scenarios for FlexComboDropDownReasonInitialize:
1. Edit reason is one of the ComboCue* reasons.
2. The combo mode is "DropDown" (not "Editable")
3. The combo mode is "Calendar" AND the edit control has ES_READONLY.