Community
Participate
Working Groups
After creating a table viewer like this CheckboxTableViewer.newCheckList(parent, SWT.NORMAL); I noticed that the size of the items isn't right. The end of the items was cut away. After debugging a while I noticed that getBounds calculates something like "string width" - left, while left is the width of the checkbox. After changing it to "string widht" + left everything appears right. I will provide a patch.
Created attachment 71722 [details] Short patch wich solves the descriped bug I only changed "-" to "+"
I experimented a bit and noticed the same bug if the TableItem has an image. I will provide a new patch.
Created attachment 71743 [details] Replacement for the patch above
Thanks for the hint and the patches. Concerning the wrong check box width calcuation: I changed the calculation to width = <text-width> (without +/- left) as the check box is not considered part of the TableItem. At least from what I observed in SWT on Win32. In case of a column-less table, the LifeCycleAdapter now adds the needed space for the check box. If the column width is still to small this is probably due to the text size approximation (plans are to replaced this by a real text size *calculation* in M5). Changes are committed to CVS HEAD
Width of an image (if any) is now added to the total with of the TableItem when no columns are specified. Changes are in CVS HEAD