How to correctly use ButtonCellPainter? [message #1137469] |
Mon, 14 October 2013 10:15  |
Eclipse User |
|
|
|
I followed the Rendereing_a_cell_as_a_button example and did the following:
- Added a button cell painter to each cell with a specific label
- Added a ButtonClickConfiguration similar to the one in the example
- Added a click listener to the painter
But the button is neither shown as pressed nor is the click listener even called when clicking the button. What am I missing? When adding a LayerListener to my table which simply logs all received events, it only receives cell selection events.
EDIT: I did some more research:
When adding the configuration to the selection or the data layer of the table body, it is called, but the layer stack only contains the layer BODY, even if I attach the label accumulator right there. The label accumulator works correctly as the labels are used as a base for rendering, and the buttons are rendered correctly. Plus, the button does not appear pressed when I click it.
[Updated on: Mon, 14 October 2013 10:46] by Moderator
|
|
|
|
|
|
Re: How to correctly use ButtonCellPainter? [message #1176372 is a reply to message #1137667] |
Fri, 08 November 2013 04:40  |
Eclipse User |
|
|
|
Sorry for not answering this thread for a long time, but it turned out that I did not need buttons in that table. I came up with a combo box solution which just works fine. I wanted the button to be a "Delete" button in the last column of every row, which now opens a combo box where I can select "Yes" or "no". So I got a nice user confirmation without having to open a dialog box.
|
|
|
Powered by
FUDForum. Page generated in 0.24447 seconds