Heeeeeelp! How to write String into NSView?
guys, i want the user to scroll while reading text,but the deal is that the multiple line label doesn't support scrolls and Scroll View doesn't support stringValue. need some help
Threads merged - please don't post the same question into multiple threads..
Might I suggest that you do some searching in your favorite search engine for your answer or buy a book about OS X/iOS development..
You can put the multiline label in the scroll view, but I did restle a bit with it myself.
I placed a multiline label on a window from the object library, and also a scroll view from the object library, then I created two IBOutlet properties in my AppDelegate, one of a NSTextField called myMultilineLabel, and one of a NSScrollView class called myScrollView, then finally connect them in Interface Builder too the Label and Scroll View on the window.
next I sized the label too what it needed to be, to hold the text it was going to hold, then I selected the scroll view, and double clicked it's interior to select it's content view, then I resized the content view with the inspectors size tab, by entering the sizes to the labels size.
then in the AppDelegate's applicationDidBecomeActive: method, I entered the code below.
But as of writing I did'nt get this method to work very well, but will let you know if I can.
|All times are GMT -4. The time now is 10:09 PM.|
Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.