Bug 568946 - Support prevent item selection in Table
Summary: Support prevent item selection in Table
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.18   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-19 02:47 EST by Marco Descher CLA
Modified: 2020-11-19 02:47 EST (History)
0 users

See Also:


Attachments
The marked element should be treated as if it does not exist (152.48 KB, image/png)
2020-11-19 02:47 EST, Marco Descher CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Descher CLA 2020-11-19 02:47:28 EST
Created attachment 284813 [details]
The marked element should be treated as if it does not exist

It should be supported to prevent the selection of a single item in a Table (or List or Combo ... but I stick to Table first). 

That is, trying to select this element should treat it as being invisible, simply ignoring it and overleap it. A clean example can be seen in in the "Open Type" Dialog (see enclosed screenshot). The marked item should be treated as if it does not exist. 

Android e.g. seems to support this behavior (http://burnignorance.com/android-apps-development/how-to-disable-selection-of-selected-items-in-a-listview/) - while for Eclipse this does not seem possible at the moment (according to https://www.eclipse.org/forums/index.php/t/146776/) 

org.eclipse.swt.widgets.Table#tableViewSelectionIsChanging seems to be a starting point to add the resp. behaviour.

I see two solutions:

Extending the ContentProvider to be queried (e.g. #isSelectable) or add a new Event to be thrown like a PreSelectionEvent where Event.doIt = false would be considered. (If this is possible at all to implement)