Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Displaying the Selection Hilighting When doing a programatic selection in a TableViewer
Displaying the Selection Hilighting When doing a programatic selection in a TableViewer [message #445771] Wed, 10 November 2004 21:02 Go to next message
Eclipse UserFriend
Originally posted by: genemb.pacbell.net

All,
When I add programatically a new row in a TableViewer, I would light
to automatically select the newly added row. I can do this
programtically be creating a StructerdSelection from the element I added
and using setSelection() on the TableViewer instance. This however does
not seem to cause a selection highlighting of the row as I get when I
select the row with the mouse. I've tried refresh of the TableViewer
and the table to no effect. Is there an easy way to do this?

Gene Moore
GSM COnsulting.
Re: Displaying the Selection Hilighting When doing a programatic selection in a TableViewer [message #445774 is a reply to message #445771] Wed, 10 November 2004 21:31 Go to previous message
Eclipse UserFriend
Originally posted by: genemb.pacbell.net

In case anyone else does this oops, here is the solution:

1)Make sure you DO NOT create your table with the HIDE_SELECTION bit. (Doh!)
2)After adding the row set the focus back to the table.

-Gene

Gene Moore wrote:
> All,
> When I add programatically a new row in a TableViewer, I would light
> to automatically select the newly added row. I can do this
> programtically be creating a StructerdSelection from the element I added
> and using setSelection() on the TableViewer instance. This however does
> not seem to cause a selection highlighting of the row as I get when I
> select the row with the mouse. I've tried refresh of the TableViewer
> and the table to no effect. Is there an easy way to do this?
>
> Gene Moore
> GSM COnsulting.
Previous Topic:Custom control and GridLayout
Next Topic:How to modify Table columns dynamically
Goto Forum:
  


Current Time: Fri Apr 26 11:49:23 GMT 2024

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

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

Back to the top