ListSelectionView keytyped on source or target items

32 views
Skip to first unread message

Corneliu Iosif Voiculescu

unread,
Jan 29, 2021, 5:55:34 AM1/29/21
to ControlsFX
Hello,

Is there a way of placing event handlers on the source list view of a ListSelectionView ?
I  want to create an event which listen for a key to be typed to easy jump to the first item in the list which starts with that letter

Thank you a lot

Marco

unread,
Jan 29, 2021, 3:39:30 PM1/29/21
to ControlsFX
simply create a keylistener, search the list for first occurence of the pressed letter. or am i misunderstanding you? regards
Message has been deleted

Corneliu Iosif Voiculescu

unread,
Mar 1, 2021, 3:53:27 AM3/1/21
to ControlsFX

Sorry .. I guess you misunderstood me.

I need a KeyListener on the source items  Listview component of a ListSelectionView
I see there are no methods which can bring me this child ListView in order to apply a KeyListener on it. (the getSourceItems provides me and ObservableList not the ListView)

What I need, is that when I am focused on the source items list, whenever I type a key, my selection should scroll to the first item starting with that key

The only way I was able to do this, until now, was by adding a ListActionView.ListAction similar to the button which move a component from a list to the other, as the initialize method provides me the source and target ListView
The only issue, is that with this ListAction, the GUI will have a button without any purpose

Thank you once again
Reply all
Reply to author
Forward
0 new messages