[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] [from e.tools] how to set a checkbox on any Table column?
|
Is the problem you are seeing this:
http://bugs.eclipse.org/bugs/show_bug.cgi?id=29910
|---------+---------------------------------->
| | Thomas L |
| | Roche/Raleigh/IBM@IBMUS|
| | Sent by: |
| | platform-swt-dev-admin@|
| | eclipse.org |
| | |
| | |
| | 04/14/2003 05:50 PM |
| | Please respond to |
| | platform-swt-dev |
| | |
|---------+---------------------------------->
>---------------------------------------------------------------------------------------------------------------------------|
| |
| To: platform-swt-dev@xxxxxxxxxxx, platform-ui-dev@xxxxxxxxxxx |
| cc: |
| Subject: [platform-swt-dev] [from e.tools] how to set a checkbox on any Table column? |
| |
>---------------------------------------------------------------------------------------------------------------------------|
First, please excuse 2 sins in advance:
* my asking this question in a list instead of eclipse.tools: this
question has spawned at least 2 threads (not both from me :-) in the
newsgroup, neither of which has (IMO) been usefully answered. Note
that I will cheerfully serialize a useful answer to the Eclipse Wiki
or other location, as well as e.tools.
* my asking both of platform-{swt, ui}-dev: I'm not sure if this
question involves only SWT, or only JFace, or both, and I'm unsure
to which list to make JFace queries.
The question is: how can one create a Table so that every cell in any
specified column(s), not merely the first, displays a checkbox?
Note the column caveat: I have made a Table with checkboxes in the
first column by using the Table ctor, as demonstrated by
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/snippits/snippet113.html
(Also note, just to prove that I'm not a shirker, that I have
documented at
http://eclipsewiki.swiki.net/2583
how to run a snippet, from either the workbench or the commandline.)
However my UI would be more appropriate (and my boss happier :-) if
the checkboxes were in the 3rd column. Both I and another newsgrouper
have tried to do this in what appears to be "the obvious way": just
iterate over the columns, and put a CheckboxCellEditor on the desired
column, e.g.
cellEditors[0] = new TextCellEditor(table);
cellEditors[1] = new TextCellEditor(table);
cellEditors[2] = new CheckboxCellEditor(table);
The texts work, but no checkbox displays. Interestingly, one observes
(again, not just me) a "checkbox-style" interaction. If one put
(boolean) data on a cell in the 3rd column, it displays as text. If
one then clicks on a cell in the 3rd column, the strings toggle
("false" <-> "true"), and don't become editable.
So
* Is this a CheckboxCellEditor bug?
- If so, I'll report to bugzilla. Meanwhile, is there a workaround?
* If not, what am I doing wrong?
* Could someone post a snippet that shows how to display a (working)
checkbox in a Table column other than the first?
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev