Why VFP does not allow send keystrokes
'Alt+DownArrow' either using ON KEY LABEL or
KEYBOARD commands ?
It's needed to drop down automatiacally the list portion of a ComboBox
through program when it meets some conditions.

Anyone know another way ?

Thank in advanced

Re: Keyboard '{ALT+DOWNARROW}' by Eric

Eric
Tue Dec 02 02:49:46 CST 2003

Hello, budieko!


The correct syntax is:
KEYBOARD '{alt+dnarrow}'

You can also use:
KEYBOARD '{F4}'
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: Keyboard '{ALT+DOWNARROW}' by budieko

budieko
Tue Dec 02 00:06:40 CST 2003

Thanks Eric

But where should I locate that code in order to
drop down automatiacally the list portion of a ComboBox ?

I have written that code in Valid or LostFocus event of the control,
but the control is not dropped down.

But it is dropped down when I write it in GotFocus event of the next control
like :

If Empty(Thisform.cmbKdToluk.Value)
Thisform.cmbKdToluk.SetFocus
Keyboard '{ALT+DNARROW}'
Endif

So it would not be dropped down when user move to the previous control or
other
control ( by mouse click)

"Eric den Doop" <ericdendoop@xspamblockxfoxite.com> wrote in message
news:uhkd#ELuDHA.1996@TK2MSFTNGP12.phx.gbl...
> Hello, budieko!
>
>
> The correct syntax is:
> KEYBOARD '{alt+dnarrow}'
>
> You can also use:
> KEYBOARD '{F4}'
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
>
>



Re: Keyboard '{ALT+DOWNARROW}' by Eric

Eric
Tue Dec 02 04:06:08 CST 2003

Hello, budieko!
You wrote on Tue, 2 Dec 2003 17:06:40 +1100:

b> But where should I locate that code in order to
b> drop down automatiacally the list portion of a ComboBox ?

You can put it in the combobox.gotfocus().
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: Keyboard '{ALT+DOWNARROW}' by budieko

budieko
Tue Dec 02 01:08:20 CST 2003

> You can put it in the combobox.gotfocus().
>> Users prefer to type directly to combobox then to choose from the list
>> (because it's faster) but (only) when users make a mistake or confuse,
they
>> could choose from the list
>> The gotfocus event always drop down the combobox, doesn't it ?



Re: Keyboard '{ALT+DOWNARROW}' by budieko

budieko
Tue Dec 02 18:00:45 CST 2003

The gotfocus event always (when meet conditions) drops down the combobox,
doesn't it ?
Meanwhile some users prefer to type directly to combobox (dropdown combo
style)
then choosing from the list (because it's faster).
But I'd like to drop down the list (only) when users make a mistake or
confuse

How to solve this ? help me

"Eric den Doop" <ericdendoop@xspamblockxfoxite.com> wrote in message
news:eb7mpvLuDHA.1744@TK2MSFTNGP12.phx.gbl...
> Hello, budieko!
> You wrote on Tue, 2 Dec 2003 17:06:40 +1100:
>
> You can put it in the combobox.gotfocus().
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
>
>



Re: Keyboard '{ALT+DOWNARROW}' by Willianto

Willianto
Wed Dec 03 15:17:20 CST 2003

Hi budieko,

budieko wrote:
> The gotfocus event always (when meet conditions) drops down the
> combobox, doesn't it ?
Yes, assuming you follow Eric's suggestion to put the Keyboard statement
in the GotFocus event.

> Meanwhile some users prefer to type directly to combobox (dropdown
> combo style) then choosing from the list (because it's faster).
You meant like typing 'N' and then open the drop down list to expect the
list starts from 'N' ?

> But I'd like to drop down the list (only) when users make a mistake or
> confuse
Will the following help?

*
* QuickFill Combo
* Author: Ken Weber
* Last Modified: 5/20/1999
*
* Instruction: Please put following snippets in appropriate event:

*!* Key Press Event:
LPARAMETERS nKeyCode, nShiftAltCtrl

if between(nKeyCode, 32, 122)
for x = 1 to this.ListCount
if upper(subs(this.list(x), 1, this.selstart+ 1)) = ;
upper(subs(this.text, 1, this.selstart)+chr(nKeyCode))
nCurPos = this.selstart + 1
this.Value = this.list(x)
this.SelStart = nCurPos
* Modified by Willianto:
* Anticipate when the user press space;
* without the IF, the the code would try to fill negative
* value in SelLength.
IF (LEN(ALLTRIM(THIS.List(x))) - nCurPos) > 0
this.SelLength = len(allt(this.list(x))) - nCurPos
ELSE
THIS.SelLength = 0
ENDIF
nodefault
exit
endif
next x
ELSE
IF nKeyCode = 27
NODEFAULT
ENDIF
Endif

*!* InteractiveChange Event
IF EMPTY(THIS.Value)
KEYBOARD '{F4}'
ENDIF

hth,
Willianto




Re: Keyboard '{ALT+DOWNARROW}' by budieko

budieko
Wed Dec 03 17:49:55 CST 2003

Thank Willi

This could be usefull thing (autofill for combo) for me, but the problem
still
exists when user make the mistake at last character or user leave the combo
empty.

So user won't know has made a mistake or user couldn't be forced to fill the
combo
corectly without control of another object (such as save button). The combo
cannot
controls itself.
Keyboard statement that is located in Interactivechange event wouldn't drop
down
the list if there isn't changes though the mistake still occurs and the
value is empty.

I think when combobox could drop down its list from Valid or (maybe)
Lostfocus,
it would be easier. Is it true ?

I have try this for list of employeeid, called NIP