Contents

sizeOfLabel(_:)

Calculates the size of the receiver’s label.

Declaration

func sizeOfLabel(_ computeMin: Bool) -> NSSize

Discussion

If shouldTruncateLabel is false, returns the size of the receiver’s full label. If shouldTruncateLabel is true, returns the truncated size. If your application does anything to change the size of tab labels, such as overriding the drawLabel(_:in:) method to add an icon to each tab, you should override sizeOfLabel(_:) too so the NSTabView knows the correct size for the tab label.

See Also

Related Documentation

Working with Labels