I develop Eclipse RCP application and got a problem with a Table
. We have some data in database in boolean format and users wants to see that field using checkbox
.
I tried to implement it using Button(SWT.CHECK)
as Table-Editor, but it worked too slow :(
I tried to use 2 images - checked and unchecked check-boxes, it works, but I can't align them to center, they are aligned to left automatically.
I even found how to catch SWT.MeasureItem
and SWT.PaintItem
events and process them manually by change event.x
field, but I got a problem - I can't get what column measuring or painting at the moment, because Event doesn't provides me that information.
Is it the only way to align images to center by modify event data on redrawing, or may be there is other ways to represent boolean data via check-boxes? I don't need to edit them now, so read-only mode should be enough.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…