Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Position text within an NSTextField

Cocoa noob here. I'm working with an NSTextField, and am using CALayer to style the border of it.

It looks like this:

Screenshot

My question is: how can I position where the input text actually starts? I'd like to be able to push it over from the left and the top a bit.

Thank you!

like image 589
Connor Avatar asked Oct 21 '22 22:10

Connor


1 Answers

Can't you solve this by creating a NSView container? So it will look a bit like this: NSView with CALayer border and NSTextField inside.

You get the idea?

like image 62
Werner Avatar answered Oct 27 '22 21:10

Werner