Lefora Free Forum
Loading
775 views

How can I move a NSTextField ?!

Page 1
1–3
rookie - member
4 posts

Hi everyone ! 

-New to cocoa... blablabla... Lost... Blablabla... --> Help ^^-

I want to move a NSTextField each redraw. Just set an other origin without creating an other textfield indeed... I init this text field with the method "initWithFrame" and try to set the origin of the frame after, but it doesn't work. I try an other "initWithFrame" each draw but i don't think it is a clean and good solution :: ;)

Do you have a simple way to do this ?!

Thanks for your time and your skills !

Nicolas 

rookie - member
4 posts

Well, finally it works with the "setFrameOrigin" method ^^

?
288 posts

That's interesting - and congratulations on digging yourself out of trouble.  Good Job!

I always create controls using Interface Builder.  I've written some tutorials about Cocoa and I hope you might find them useful and/or interesting.

http://clanmills.com/articles/cocoatutorials

One of the Tutorials is "QuartzClock" in which I develop a clock (as a custom control).  That tutorial uses the the initWithFrame method.  The clock has a couple of themes and appears to be different in a window from the dock!  (However the dock icon is alive and ticking)!

__________________
Page 1
1–3

Locked Topic


You must be a member to post in this forum

Join Now!