Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LostFocus vs. Valid in Comboboxes
Message
 
To
15/09/1999 13:30:06
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00264458
Message ID:
00265105
Views:
31
>>What kind of box is it? There are two ideas in play here:
>>
>>1) The Click does not fire when user clicks on the "dropdown arrow" - so a normal selection can be made without any problems.
>>2) Any other behavior (incremental search, e.g.) can be controlled in the Lostfocus by stopping exit with a NoDefault. I don't know the details of what you're doing, but the hope is that a combination of these two ideas will help...
>
>I meant the textbox part of the Combobox. If the user clicks there, won't the Click Event fire?
>
>I'm going to try some of these suggestions and see what happens.

Depends what you're doing, but to prevent that, you can use a form or combo class property, say, Listval.
In Init: this.Listval = this.list(1)

in Click:

if this.value != this.Listval
  this.lostfocus
endif

In Lostfocus:

this.Listval = this.value
...other code
As I say, I'm not sure the exact circumstances, but that's one other step, maybe...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform