Re: Programmatically created NSButton is drawn in the wrong position.

2020-12-15 Thread Keary Suska via Cocoa-dev
Based on what you are doing, setting the property to YES will get you closer to what your problem is. When this property is NO, you cannot accurately control the view’s frame. That being said, when are you verifying that the frame of the buttons is unchanged? Keary Suska Esoteritech, Inc.

Re: Programmatically created NSButton is drawn in the wrong position.

2020-12-15 Thread Steven Mills via Cocoa-dev
On Dec 15, 2020, at 04:49:19, Eyal Redler via Cocoa-dev wrote: > > setting translatesAutoresizingMaskIntoConstraints to yes makes the situation > worse. The buttons are drawn further away than their frames indicate. Are you using Xcode's Interface Debugger to inspect the entire view hierarchy

Re: Programmatically created NSButton is drawn in the wrong position.

2020-12-15 Thread Eyal Redler via Cocoa-dev
setting translatesAutoresizingMaskIntoConstraints to yes makes the situation worse. The buttons are drawn further away than their frames indicate. Eyal > On 15 Dec 2020, at 4:05, Ben Kennedy wrote: > > >> On 14 Dec 2020, at 5:39 pm, Eyal Redler via Cocoa-dev >> wrote: >> >> button =

Re: Programmatically created NSButton is drawn in the wrong position.

2020-12-14 Thread Ben Kennedy via Cocoa-dev
> On 14 Dec 2020, at 5:39 pm, Eyal Redler via Cocoa-dev > wrote: > > button = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)]; > [button setTranslatesAutoresizingMaskIntoConstraints:NO]; > [button setBezelStyle:NSRoundedBezelStyle]; > [button setTitle:buttonTitle]; > [button

Programmatically created NSButton is drawn in the wrong position.

2020-12-14 Thread Eyal Redler via Cocoa-dev
I'm configuring a view with some push buttons and other views programmatically and the buttons are drawn offset to the right. For example, the first button should be at 0,20 but it is drawn at 6,20. I checked that the buttons are not moved, the button frames remain the same, the buttons are