I have just posted my new ListView Select methods to the Tracker as a
Feature Request. Perhaps some kind soul (Steve? Laurent?) with CVS write
access would be good enough to take a look and commit the changes to
ListView.xs if all looks OK.

The consensus of opinion seemed to be that SelectAll() is more intuitive
than Select(-1), though there is also an argument to follow the
underlying API conventions. I've followed Steve's
have-your-cake-and-eat-it approach by implementing both.

There are four methods. The enhanced Select() allows Select(-1) to
select all items in the list. There are checks for out-of-bounds
parameters and to make sure the list is in the correct mode. I thought
I'd identified a bug with the original method, related to focus (though
I couldn't reproduce it later). *If* it really was there, this should
fix it. SelectAll() is an alternate way to select all items. Following
Windows' conventions (or at least Windows Explorer's), SelectAll()
leaves focus at item 0. The new Deselect() and DeselectAll() methods
enable the programmer to deselect an item programmatically.
Correspondingly, Deselect(-1) is an alternative to DeselectAll().

These aren't complex methods, but there is always room for error. Please
let me know if there are any problems.

Glenn Munroe



Reply via email to