Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Setting cell focus in TableViewer(SWT Table)
Setting cell focus in TableViewer [message #523255] Thu, 25 March 2010 16:38 Go to next message
Brian is currently offline BrianFriend
Messages: 15
Registered: July 2009
Junior Member
I've seen a couple other posting references but most are several years old.

Is there a way to set focus on a particular cell in a table? I've tried everything I can think of and had no luck.

Thanks.
Re: Setting cell focus in TableViewer [message #523361 is a reply to message #523255] Fri, 26 March 2010 07:44 Go to previous messageGo to next message
Artem Redkin is currently offline Artem RedkinFriend
Messages: 26
Registered: July 2009
Junior Member
Maybe org.eclipse.jface.viewers. FocusCellOwnerDrawHighlighter is what your looking for?
Here's an example:
http://dl.dropbox.com/u/2610519/TestTable.zip
Re: Setting cell focus in TableViewer [message #523362 is a reply to message #523255] Fri, 26 March 2010 03:10 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
Snippet036FocusBorderCellHighlighter in JFace snippets might be helpful
for your scenario.
Re: Setting cell focus in TableViewer [message #523462 is a reply to message #523255] Fri, 26 March 2010 09:40 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
At the swt level this is done with TableCursor, for an example see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet96.java?view=co .

Grant


"Brian" <nebulour@gmail.com> wrote in message
news:hog3ir$ttr$1@build.eclipse.org...
> I've seen a couple other posting references but most are several years
old.
>
> Is there a way to set focus on a particular cell in a table? I've tried
everything I can think of and had no luck.
>
> Thanks.
Re: Setting cell focus in TableViewer [message #523850 is a reply to message #523255] Mon, 29 March 2010 15:40 Go to previous message
Brian is currently offline BrianFriend
Messages: 15
Registered: July 2009
Junior Member
Thanks for the replies. I've looked at some of the examples and I'll keep experimenting but I was hoping for a relatively simple way to programatically put the focus in a particular cell.

Say if I have 5 rows and 4 columns, put the focus (as if a mouse click) in row 2, column 3.

It doesn't seem like it should be that difficult.
Previous Topic:Set sorting column using keyboard
Next Topic:Treeviewer Scrollbar vanishing act
Goto Forum:
  


Current Time: Fri Apr 19 23:38:45 GMT 2024

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

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

Back to the top