0

I have a NSPopUpButton in a NSTableCellView in a NSTableView. I set the PopUp in IB to the full width of the Column. Running the app, the width of the popup is reduced by 30% on the right side, leaving space in the column and truncating the text.

PopUp in IB: PopUp in IB

PopUp in app:

enter image description here

The size of the popup is Small, but setting to Regular takes no effect, nor does increasing the witdh of the cellview or the column. How can I avoid this?

heimi
  • 499
  • 7
  • 16
  • Add autolayout constraints? – Willeke Mar 02 '22 at 09:15
  • does not change anything, but thanks. – heimi Mar 02 '22 at 12:05
  • Post a [mre] please. – Willeke Mar 02 '22 at 12:13
  • I finally found the reason for that behaviour: In the viewFor-function I identify the popup with an identifier. I subclassed the NSTableCellView to add the PopUpButton, but I set the identifier of it in each column to the same value - copy-paste. So every popup had the same origin. Giving the popups in evers column their own identifiers solved the issue. Thanks. – heimi Mar 04 '22 at 20:00

0 Answers0