Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect if an AUTO-COMPLETE dropdown is shown
Message
From
27/02/2010 12:59:48
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01451377
Message ID:
01451458
Views:
45
>Hello!
>
>This has been bothering me for a few days... hopefully someone here can shed some light!!
>
>I have a Form with a Textbox set to support AutoComplete. Of course, that means that an AutoComplete Dropdown appears while the interactive input to the textbox matches at least one entry on the table that supports the AutoComplete function.
>
>How can I detect if the DropDown triggered by AutoComplete is visible? (Depending on whether the AutoComplete DropDown is visible/active or not I would allow/disallow a method from firing at the KeyPress event of the Textbox).
>
>None of the ideas I have come up with to try to detect the presence of a visible AutoComplete dropdown are painless to implement or "elegant" (for example, trapping for a down-arrow key, or a tab, or text value that "fits" into an available entry of the AutoComplete table). I am sure, the AutoComplete dropdown object is defined/available somewhere where I can read its VISIBLE property but I don't how to look for it. Is it named randomly by VFP as I suppose? Would it be part of _SCREEN?
>
>Thanks!!!
Hi,

I believe you can test the setting of the AutoComplete Property 0 = no support also you may check the controlsource of AutoCompSource and/or AutoCompTable however this will not give an answer if user has used a value form AutoCompSource nor AutoCompTable , you could check if the input value is one of the Autocomptable records in the valid of your textBox

Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform