Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

This event fires when the list portion of a combo box drops open.

Usage

PROCEDURE cboCombo.DropDown
[ LPARAMETERS nControlIndex ]

As with many other events, the nControlIndex parameter is relevant only when the combo is one of a group of controls contained in an array. In that case, the parameter is passed to tell you which member of that group triggered the event.

This event fires before the list drops down to give you a last chance to change the contents of the list.

Except in VFP 3. There, the list drops down first, then the event fires. We were very pleased to see this bug among the fixes in VFP 5.

Example

PROCEDURE cboState.DropDown
   IF ThisForm.lAllowNoChoice
      This.AddItem("None of the above")
   ENDIF
ENDPROC

See Also

ComboBox, DownClick