Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ryss Unger
  Where is Ryss Unger?
 Cape Town
 South Africa
 Ryss Unger
 To: Ryss Unger
  Where is Ryss Unger?
 Cape Town
 South Africa
 Ryss Unger
 Tags
Subject: RE: How to force a dropdown list to drop down (added to FAQ)
Thread ID: 323 Message ID: 335 # Views: 5 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, May 23, 2001 2:04:44 PM         
   


> > put this code in the gotfocus event of the dropdown
> > keyboard '{alt+dnarrow}'
> > this.click()
> >
> > this will force the dropdown when the dropdown gets focus as long as you don't click the down arrow. Clicking the arrow will cause the list to retract. I place a box the same color as the background over the arrow (I haven't found out a way to remove it) so it doesn't get clicked. The only problem with this is that if the list is not dropped down you can't click the arrow to force it so i put this code in the doubleclick event:
> > keyboard '{alt+dnarrow}'
> >
> > this will force the dropdown when double clicked.
> >
> > hope this works for you
> > gary
>
> Hi Gary,
> I have not tried this littel trick but I LOVE IT...
>
> Good thinking ....
>
> A variation could allow the code in click event as..
> If vcall = "incode"
> keyboard '{alt+dnarrow}'
> endif
>
> Not tested but get the idea .. solves the problem decribed above.
>
> Regards
> Ryss
Hi Gary,
Ok so that (the code in click event as) did not work but this does and solves your problem.

To programmatically get a Combo Box to show the Drop Down listbox do the following.

1. Code to force Dropdown

vcall = "Code"
thisform.combo1.setfocus


2. Put this code in the gotfocus event of the dropdown
If vcall = "Code"
vcall = '' " && return to default
keyboard '{alt+dnarrow}'
this.click()
endif

This will force the dropdown in code and do the normal operation when Clicking the Combo Box's down arrow.

As stated I love your solution.. thanks

Ryss

ENTIRE THREAD

How to force a dropdown list to drop down Posted by Paul Beckett @ 5/23/2001 9:16:29 AM
RE: How to force a dropdown list to drop down Posted by Gary Sanford @ 5/23/2001 9:41:07 AM
RE: How to force a dropdown list to drop down (added to FAQ) Posted by Ryss Unger @ 5/23/2001 12:26:30 PM
RE: How to force a dropdown list to drop down (added to FAQ) Posted by Ryss Unger @ 5/23/2001 2:04:44 PM
RE: How to force a dropdown list to drop down Posted by Paul Brown @ 5/23/2001 9:46:59 AM