Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deathgrip struggle with the combobox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00192987
Message ID:
00193347
Views:
15
>>>Then, in the INTERACTIVECHANGE:
>>>THISFORM.REFRESH()
>>
>>InteractiveChange of a ComboBox fires every time the highlight moves. In other words, if you drop down the combo, each time you hit an arrow key, InteractiveChange will fire. This will fire the Form.Refresh code way more than you probably intended. You probably wanted THISFORM.Refresh in the Valid or LostFocus event, so the form refreshes after the user has confirmed a different selection. But I could be wrong.
>
>InteractiveChange fires not when highlight moves, but when Combo.Value gets changed, i.e. if you move highlight by mouse you don't fire InteractiveChange, and if you hit arrow key (regardless list is open or not) then you effectively get new combo.value and correspondingly InteractiveChange fires.

Why does moving the highlight with the arrow keys change Combo.Value, and moving it with the mouse not change it? It seems to me that they are equal actions.

As you probably guessed, one time I moved the selection with the arrow keys and saw the InteractiveChange event fire, so I assumed that it was the movement of the selection, not depending on how I moved it.

The change of the selection isn't committed in either case until the control loses focus, correct? If I use the arrow key to move the selection, then hit escape or mouse away from the combo, doesn't it cancel the change? That's the way POPUPs worked in 2.6, and I thought I had observed that VFP Combos inherited that behavior.

TIA for the lesson,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform