[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Problem with table.getSelection() !?!?
|
Not sure what you mean by "function table.getSelection() I only get the Data
of the first Column of the selected items". Table.getSelection() returns
the selected TableItems, not the text of aTableItem. I think you are
relying on the toString() implementation of TableItem. You need to iterate
over the columns in the table and get the text for each column:
TableItem[] selection = table.getSelection();
for (int i = 0; i < selection.length; i++) {
for (int j = 0; j < table.getColumnCount(); j++) {
System.out.prinln(selection[i].getText(j));
}
}
"melko" <melko@xxxxxx> wrote in message news:csod0n$8he$1@xxxxxxxxxxxxxxxxxx
> Hallo!
>
> I want to select a Row in the table and then to copy the whole content to
> the clipboard! But the problem is that with the function
> table.getSelection() I only get the Data of the first Column of the
> selected items?!?!?!? WHY? Or is there maybe an other way to copy
> table-rows?!? Thanks!!
> take care, melko
>