mercredi 13 janvier 2016

SWT checkbox with empty text has wrong focus/allignment

I am trying to add a checkbox to a column in a table. This seem to work pretty well, but is seem to add focus to the empty text field to the right of the checkbox. This also causes it to be hard to align the checkbox correct in the center.

Example:

Example of checbox with wrong focus

Code:

    Button button = new Button(table, SWT.CHECK);
    button .setAlignment(SWT.CENTER);
    button .setLayoutData(new FillLayout());

Is there any way to avoid that, so the empty text field to the right of the checkbox is not shown?




Aucun commentaire:

Enregistrer un commentaire