Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Column Header selection when body has one row
Column Header selection when body has one row [message #1402819] Thu, 17 July 2014 15:31 Go to next message
Sunny          is currently offline Sunny Friend
Messages: 37
Registered: September 2011
Member
Hi
I have a nattable with only one row in the body. But when I select the row, column header also gets selected. But if I have more than one row in the body, I don't see this problem.

I unregistered selection bindings like below :
uiBindingRegistry.unregisterSingleClickBinding( MouseEventMatcher.columnHeaderLeftClick( SWT.NONE ) );
uiBindingRegistry.unregisterSingleClickBinding( MouseEventMatcher.columnHeaderLeftClick( SWT.SHIFT ) );
uiBindingRegistry.unregisterSingleClickBinding( MouseEventMatcher.columnHeaderLeftClick( SWT.CONTROL ) );
uiBindingRegistry.unregisterSingleClickBinding( MouseEventMatcher.columnHeaderLeftClick( SWT.SHIFT
| SWT.CONTROL ) );

But it doesn't seem to work.
How to prevent column header selection in all cases?

Thanks.
Re: Column Header selection when body has one row [message #1402859 is a reply to message #1402819] Thu, 17 July 2014 21:06 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
You are mixing things up. As far as I understand, you want to disable the selection styling of the column header. Not the selection behaviour when clicking on a column header.

You simply need to override the selection styling of the column header to look like it wouldn't be selected. The other solutino would be to override the selection behaviour of the SelectionLayer. But as your request is a styling question, I suggest to configure the styling.
Re: Column Header selection when body has one row [message #1402926 is a reply to message #1402859] Fri, 18 July 2014 11:54 Go to previous messageGo to next message
Sunny          is currently offline Sunny Friend
Messages: 37
Registered: September 2011
Member
Can you please let me know how to override selection behavior of selection layer just for column header?
Re: Column Header selection when body has one row [message #1402928 is a reply to message #1402926] Fri, 18 July 2014 12:04 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
What, the styling or the action bindings?

For the styling check the selection styling configuration, for action bindings you found the configurations already in the default selection binding configuration.
Previous Topic:Best way to apply dynamic styling in 1.1
Next Topic:NatTable Repository
Goto Forum:
  


Current Time: Tue Apr 16 07:41:19 GMT 2024

Powered by FUDForum. Page generated in 0.38320 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top