PDA

View Full Version : Tree: event for selection change via keyboard?


pcorcoran
04-27-2007, 02:13 PM
This is less of a bug than an enhancement request....

It would seem that no event fires in the tree when a selection change has happened as a result of keyboard activity. That is, pressing up-arrow and down-arrow (potentially) changes the selected tree node, but I cannot see a way to listen for when this happens.

Looking at DefaultSelectionModel, it doesn't seem it would be that hard to fire an event ("onselectionchange"?) from selectPrevious() and selectNext().

(Obviously I can code this up myself, but I thought it might be a useful feature in general for the tree.)

And, in general, thank you for the high quality code -- it's a pleasure to read and tweak.

cheers,
Patrick Corcoran

pcorcoran
04-27-2007, 02:35 PM
I found the 'selectionchange' event. It's hanging from the SelectionModel object instead of the Tree. This seems slightly out of place to me, but that's obviously a matter of taste.

cheers....

jack.slocum
04-30-2007, 08:32 AM
That's where it belongs. Not every selection model will have the same events.