So, this is my case :
- One
NSBox - Inside this, there is an
NSTextField
What I want to do is :
- Programmatically manage to position the textField in the box (e.g. top left, top right, center, etc).
I’ve tried doing it with NSTextField‘s bounds or frame, but I don’t think I can make it…
Any ideas?
If I understood your question correctly, do you just want to make sure the NSTextField is always in the top left, center, or whatever, when the view is resized? If so, then you can use struts and springs for that. If you just want to move the text field, then changing the frame should work. Ex, if you have a text field called foo, you can set the whole frame:
or just its origin (effectively repositioning it):