Community
Participate
Working Groups
Though attached with a SWT.MearsureItem event handler, an initial empty table doesn't modify row height (between grid lines) as the event handler has implied. table.addListener(SWT.MeasureItem, new Listener(){ public void handleEvent(Event event) { event.height=24; } }); Being displayed, filling one or more TableItem will change the row height. And clearing TableItems to make the table empty again does keep the modified row height. It seems tricky. We want that row height being modified even when initialized as an empty table. (see attached pics)
Created attachment 37490 [details] SWT.MeasureItem event handler doesn't affect initial empty table
Since an empty table has no items, we can't send SWT.MeasureItem. If we make setItemHeight() API, then you will be able to use it to set the item height you want. Have you considered setting the lines not visible when the table is empty? *** This bug has been marked as a duplicate of bug 148039 ***
Up to now we can only change table's item height via SWT.MeasureItem listener. But an empty table can also paint its grid lines when setLinesVisible(true) being called. We want to control table's behavior whatever empty or not in the same way. In a RCP application, it's better not to suprise your users.