Skip to main content

[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?

Tom Roche Wed, 16 Apr 2003 20:38:12 -0400
> I wanna be able to iterate over the columns, set CellEditor's on the
> columns, and then, when the user hits the Add button, add a row of
> default data, with a checkbox appearing in the appropriate row.

Doh! I meant "with a checkbox appearing in the appropriate column."

as determined in the control creator, when iterating over the columns,
as in the fragment cited

> +     for (int i = 0; i < N_COLUMNS; i++) {
> +       String cp = columnProperties[i];
> +       if         (cp.equals(NAME_PROPERTY)) {
> +         cellEditors[i] = new TextCellEditor(table);
> +       } else if (cp.equals(PATH_PROPERTY)) {
> +         cellEditors[i] = new TextCellEditor(table);
> +       } else if (cp.equals(CR_PROPERTY)) {

> +         cellEditors[i] = new TextCellEditor(table);
> -         cellEditors[i] = new CheckboxCellEditor(table);

> +       }
> +     }



Back to the top