Displaying the Selection Hilighting When doing a programatic selection in a TableViewer [message #445771] |
Wed, 10 November 2004 21:02 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02699 seconds