0

I am using an NSTabView in an application inside a resizable window.

The number of tabs and their titles are variable, so I would like to determine the width of the segment control at the top.

I have tried adding up the tab item's [item sizeOfLabel:FALSE] but there seems to be extra space involved (the sum of values returned is less than the actual width).

Also the frame property of the item's view ( [[item view] frame] ) appears to have an arbitrary size.

Any ideas?

Yamodax
  • 431
  • 3
  • 5
  • What do you mean by "the label's view appears to have an arbitrary size"? – Willeke Mar 23 '16 at 15:33
  • Is NSTabView's `minimumSize` what you're looking for? – Willeke Mar 23 '16 at 15:42
  • The user can configure the name of the tabs, so the program doesn't know them upfront. It can be anything from two tabs named "A" and "B" to ten tabs named "Quasimodo" and I want to handle cases where the width of the titles overflows the width of the window. – Yamodax Mar 23 '16 at 17:09

0 Answers0