1

So i have here a Cellbutton :

        Column<dateiles, String> column_2 = new Column<dateiles, String>(new ButtonCell()) {
        @Override
        public String getValue(dateiles object) {
            int s = object.comments.size();
            String ss = String.valueOf(s);
            return ss;
        }

    };
    cellTable.addColumn(column_2, "Comments");
    cellTable.setColumnWidth(column_2, "100px");

i want to add to my buttons for each cell column a Tooltip but how is it possible

user3110458
  • 374
  • 5
  • 17

1 Answers1

1
this.addCellPreviewHandler(new Handler<Tabletype>() {

            @Override
            public void onCellPreview(final CellPreviewEvent<Tabletype> event) {
                int columnID = event.getColumn();

            }
        });

    }

Just replace tabletype with the object you definded when instantiating the table ( The T of CellTable<T> ) Then with the columnID you can detect the right column.

Akkusativobjekt
  • 2,005
  • 1
  • 21
  • 26