Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox When( ) Method Ignored (Sort of)
Message
 
 
To
31/12/2002 09:43:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00736938
Message ID:
00737052
Views:
21
George,

Turn on event logging and checkout what's going on.

It appears that the mousedrag operation that you are performing is triggering the ProgramaticChange event to fire even though the When() should have prevented anything from happening. The GotFocus() never fires so the cbo doesn't get focus, but the mouse*, click() and progchange events still fire. I think you could put conditional code into ProgramaticChange() and NODEFAULT under the same condition that causes the When to return .f. ala:
if ( ! thisform.editing )
   nodefault
endif
>I would expect that the value of Combo1 cannot change, since the When( ) method returns false. This is not the case. The user can click on the center of Combo1, then drag out of Combo1 (either up or down). This changes the value, a little. Usually only a few values up or down.
>
>This is very scary behavior, as we have hundreds of forms with comboboxes on them, and the default behavior of the framework we are using is to have:
>
>RETURN thisform.editing
>
>in the When clause of all objects, and to only allow editing at certain times.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform