Is ListView missing a selectionEnabledProperty?

John Smith John_Smith at symantec.com
Fri Apr 26 11:15:49 PDT 2013


This came up on a forum question.

https://forums.oracle.com/forums/thread.jspa?messageID=10945037 "Disable selection in ListView"

James suggested creating  a DisabledSelectionModel which subclasses MultipleSelectionModel so that selection is not allowed (this can be done with the public API today)

Shakir suggested that the best solution would be what you are hoping for (this requires a platform API change):
  listView.setSelectionModel(SelectionMode.NONE);
Though it looks like nobody created a feature request.

-----Original Message-----
From: openjfx-dev-bounces at openjdk.java.net [mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of Randahl Fink Isaksen
Sent: Friday, April 26, 2013 10:32 AM
To: openjfx-dev at openjdk.java.net List
Subject: Is ListView missing a selectionEnabledProperty?

I have a use case where I show a list of items to the user. Since the user is not expected to select any of the items, I wish to turn off selection. this can be achieved by disabling the list, but I do not wish to go down that alley, since this changes the visual appearance of the list, and keeps my user from scrolling among the list items.

I was hoping for something like

    getSelectionModel().setSelectionMode(SelectionMode.NONE) 

but this is not possible. Am I missing something here, or should I file a feature request?

Thanks

Randahl



More information about the openjfx-dev mailing list