• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTextView + NSTabView - Frame/Scroll issues?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView + NSTabView - Frame/Scroll issues?


  • Subject: NSTextView + NSTabView - Frame/Scroll issues?
  • From: Brian Amerige <email@hidden>
  • Date: Thu, 4 Jan 2007 17:31:58 -0500

Hey all,

Ive got an NSTabView (PSMTabBarControl and the like) with NSTabViewItems being generated by code. Their View, an NSTextView, is also generated by code as such:

NSTextView *newTextView = [[[NSTextView alloc] init] autorelease];
[newTextView setEditable:YES];
[[newTextView textStorage] setDelegate:self];
//Open a new window
NSTabViewItem *newTabViewItem = [[[NSTabViewItem alloc] init] autorelease];
[newTabViewItem setView:newTextView];
[oTabView addTabViewItem:newTabViewItem];


I've tried adjusting the frame ([newTextView setFrame:[oTabView contentRect]];) of the NSTextView, (both before and after i called addTabViewItem:), but it doesn't seem to respond to it nicely.

It doesn't fill the height of the window (even thought the springs in IB are accurately set for the NSTabView), but rather it fills the height to match the size of the document (eg. a 5 line text file is only a 5 line textview). In the event that the document is taller (height wise) than the window, it doesn't add a scrollbar, either.


Any comments are welcome! _______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: [Moderator] EOT (Re: Enabling a Menu item)
  • Next by Date: Help with Predicate count/relationships
  • Previous by thread: Re: CoreData - trying to avoid separate thread
  • Next by thread: Help with Predicate count/relationships
  • Index(es):
    • Date
    • Thread