[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: Cell selection in a tableviewer
|
This is not possible. SWT doesn't has direct API to fetch the row-index
and for viewers it is most of the time not important because the
Model-Object should hold all the data but you could easily calculate it
from the Cell-Bounds or even better if you are in-single-select-mode
(which you must :-) query to the table for the current-selection-index.
Tom
Jörg schrieb:
Thanks for your help. Both method does what i want. I have it now done
with the focusCellManager. But a little problem exist here, I got the
columnindex with this focusCellManager.getFocusCell().getColumnIndex(),
but how can i get the index of the row?
Tom Schindl schrieb:
There are multiple possibilities since 3.3. SWT-Tables and Trees don't
have the idea of a Cell. That's why JFace holds a bunch of code to
make such a feature available to you (although we don't support
SWT.MULTI).
Take a look at the various snippets:
http://wiki.eclipse.org/JFaceSnippets#Snippet026TreeViewerTabEditing
Tom
Ed Merks schrieb:
Jörg,
I've not used it yet, but I think org.eclipse.swt.custom.TableCursor
would be used for that purpose.
Jörg wrote:
Hello,
i have more than one cell in a line. Now i want to select the second
or the third cell in this line. What code i need to make this
possilble?
Greetings
--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl JFace-Committer
--------------------------------------------------------------------