Board index » delphi » Automatically displaying combo box's drop down list on field entry

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

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

 

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


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

Jon Robertson <to...@flash.net> wrote in article
<01bbd87f$e546f6e0$2b7bb4cc@jon>...

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

Other Threads