Lefora Free Forum
login join
Loading
299 views

Manipulate textfield position

Page 1
1–2
rookie - member
1 posts

I am trying to change the position of a textfield or label programmatically by type in the x y  positon during runtime. What is a simple way to begin this?

superstar - member
234 posts

You'll need to know the x,y position of course.  You could ask the user with a dialog box - or it could be passed on the command-line, from a preference file - or any way that seems appropriate to your application.

You can set the window position with
NSPoint p ;
p.x = x ; p.y = y ;
[window setFrameTopLefPoint:p];

Of course you have to know window and you may know this via the awakeFromNib, windowDidLoad, a delegate or some other way.  Without knowing more about your code, I can't say which of many methods should be used.

__________________
Page 1
1–2

Locked Topic


You must be a member to post in this forum

Join Now!