Automatically displaying combo box's drop down list on field entry

Automatically displaying combo box's drop down list on field entry

Post by Jon Robertso » Sat, 23 Nov 1996 04:00:00



I'm using Delphi 1.02 and Infopower 2.02.  However, this question could
apply to Delphi w/o Infopower.

The TwwDBComboBox and TwwDBLookupCombo components have an
AutoDropDown property that displays the drop down list when a keystroke
is entered.  I would like do display the drop down list when the field is
entered.

The field is in a grid.  I've tried using the DropDown method in the
OnEnter event of the combo box, using the DropDown method in the grid's
OnColEnter event based on the value of GetActiveCol, and using
ShowMessage(ComboBox.Handle, CB_SHOWDROPDOWN, Integer(True), 0);
in the grid's OnColEnter event based on the value of GetActiveCol.  None
of these work.

Any ideas?  Thanks,

Jon Robertson
Arkansas CAMA Technology

 
 
 

Automatically displaying combo box's drop down list on field entry

Post by Hurrican » Tue, 26 Nov 1996 04:00:00


i normally use the following code to perform this:

            SendMessage(Ctrl.handle, CB_SHOWDROPDOWN, 1, 0);
            PostMessage(Ctrl.handle, CB_SETCURSEL, 0, 0);

hope it helps



Quote:> I'm using Delphi 1.02 and Infopower 2.02.  However, this question could
> apply to Delphi w/o Infopower.

> The TwwDBComboBox and TwwDBLookupCombo components have an
> AutoDropDown property that displays the drop down list when a keystroke
> is entered.  I would like do display the drop down list when the field is
> entered.

> The field is in a grid.  I've tried using the DropDown method in the
> OnEnter event of the combo box, using the DropDown method in the grid's
> OnColEnter event based on the value of GetActiveCol, and using
> ShowMessage(ComboBox.Handle, CB_SHOWDROPDOWN, Integer(True), 0);
> in the grid's OnColEnter event based on the value of GetActiveCol.  None
> of these work.

> Any ideas?  Thanks,

> Jon Robertson
> Arkansas CAMA Technology