Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping the reordering of an item in a list box with mo
Message
 
To
09/05/2002 12:30:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00654563
Message ID:
00654592
Views:
15
>I have a list box with mover buttons:
>
>myList.MoverBars = .T.
>
>How do I trap the reordering of objects in the list (I click on a list item and drag it to a different position in the list ) and differentiate that event from simply clicking on one of the list items (without repositioning it)?

The difference is that when you just click on an item in a listbox InteractiveChange event fires (I am setting aside other events like When, GotFocus, MouseDown, MouseUp).
so the events sequence you are interested in basically is

InteractiveChange()
Click()

When you reorder the items with moverbars, the sequence is

ProgrammaticChange()
InteractiveChange()
Click()

So, you might set some property in ProgrammaticChange(), check it in InteractiveChange() and reset in Click().

That might give you some control. Of course you should watch if any other code somewhere may change the listbox value programmatically.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform