When i assign text to my Labels
, they wrap around it very tightly, sometimes cutting the lower edges off 'p', 'y' and alike. I would like to have some padding between text and border. I am using a TableWrapLayout for the parent Composite
and TableWrapData for the Labels
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 2;
layout.bottomMargin = 10;
layout.topMargin = 10;
client.setLayout(layout);
Label label= toolkit.createLabel(client, "", SWT.NONE);
We are using the FormToolkit for consistent design, IMHO this has no influence on border painting
(Answer many years later, but still an answer...)
CLabel cl = new CLabel(shell, SWT.CENTER);
int padding = 5;
cl.setMargins(padding, padding, padding, padding);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With