Skip
Skip

Reputation: 6531

Measuring font fontsize of CTabItems in SWT?

I have got some CTab items, which I want to measure, especially I need to know the actual Font Size, so that if I change the Tab Size - I do not won't set it smaller, than the font-size.

How can I measure the fontsize of CTabItems in SWT?

Upvotes: 1

Views: 85

Answers (1)

Baz
Baz

Reputation: 36894

item.getFont().getFontData()[0].getHeight()

will give you the font size used in the item.

Upvotes: 1

Related Questions