Posted By

ibob on 02/07/13


Tagged


Versions (?)

Setup a Scroll View With TextView (Multiline Text in Cocoa)


 / Published in: Ruby
 

  1. # Setup a scroll view containing a text view
  2.  
  3. @scroll_view = scroll_view(:frame => [0,0,495,300], :layout => {:expand => [:height, :width]})
  4. @text_view = text_view(:frame => [0,0,490,300])
  5. @scroll_view.documentView = @text_view
  6.  
  7. #Load into the window with: win << @scroll_view
  8.  
  9. #To read/write text under the text_view, you can refer to it as @text_view.string = " Text"

Report this snippet  

You need to login to post a comment.