Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TableViewer setSelection not first column
TableViewer setSelection not first column [message #483806] Thu, 03 September 2009 07:01 Go to next message
Julien is currently offline JulienFriend
Messages: 15
Registered: July 2009
Junior Member
Hello,

I'm trying to select an item in a Tableviewer with multiple columns, the
selected item(or cell) should be highlighted like the default
behavior. A TableItem represent a line of the Table, I'm able with the
getData() on tableItem to find the element I need to Highlight. But
SetSelection methods either in TableViewer or Table only select Items in
the first Column. I've tried SWT.FULL_SELECTION bit or without it. I'm
using Eclipse 3.4 and Windows XP.
I am sure I'm missing something but what?

Best Regards,
Julien
Re: TableViewer setSelection not first column [message #483978 is a reply to message #483806] Thu, 03 September 2009 19:33 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Julien,

The default Table behaviour on win32 is to only show selection in the first
column. Creating the Table with style SWT.FULL_SELECTION should be all
that's needed to give you what you want. I don't remember this ever not
working on XP (I assume you're using the swt-win32 port, not the swt-WPF
port, right?). I don't know what could be causing this to not work, unless
either you were not actually setting the style bit somehow, or you were
running with some unusual theme that doesn't respect this native style. Or
maybe you have some custom draw listeners hooked, SWT.EraseItem in
particular? Are any of these possible?

Grant


"Julien" <jdenet@sodifrance.fr> wrote in message
news:h7npl9$lll$1@build.eclipse.org...
> Hello,
>
> I'm trying to select an item in a Tableviewer with multiple columns, the
> selected item(or cell) should be highlighted like the default
> behavior. A TableItem represent a line of the Table, I'm able with the
> getData() on tableItem to find the element I need to Highlight. But
> SetSelection methods either in TableViewer or Table only select Items in
> the first Column. I've tried SWT.FULL_SELECTION bit or without it. I'm
> using Eclipse 3.4 and Windows XP.
> I am sure I'm missing something but what?
>
> Best Regards,
> Julien
Previous Topic:Subclassing Rich Edit Boxes
Next Topic:JEditorPane Problem
Goto Forum:
  


Current Time: Fri Apr 26 16:39:24 GMT 2024

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

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

Back to the top