• 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
adjusting subviews : NSTextView in NSScrollView in NSTabViewItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

adjusting subviews : NSTextView in NSScrollView in NSTabViewItem


  • Subject: adjusting subviews : NSTextView in NSScrollView in NSTabViewItem
  • From: "Ewan Delanoy" <email@hidden>
  • Date: Mon, 30 Apr 2007 09:47:29 +0200 (CEST)
  • Importance: Normal

        Hello all,

 in my Cocoa app, the main window is filled with an NSTabView with
no tabs and no border (a menu item is used to change tab view items)
and one of the tab view items contains an NSTextView.

 I want that text view to ``fill" the tab view item's content, i.e. to appear
exactly as in "Wrap-To-Window" mode in TextEdit.

 So I have the following piece of code in the initialization phase :

NSScrollView* sv=[myTextView enclosingScrollView];
NSRect wholeFrame=[[sv superview] frame];
[sv setFrame:wholeFrame];

 However, this does not produce the output I expected : the text view
appears too much to the right and too upwards. Why does this happen, and
what exact values should I put to adjust the frame rectangle in the code
above ?

                                                          Ewan

_______________________________________________

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: Re: Handling malformed xml and preserving newlines while creating NSXmlDocument
  • Next by Date: Custom View Bindings (was : NSTextView's "data" binding)
  • Previous by thread: EPS NSPrintOperation not working as set
  • Next by thread: Re: adjusting subviews : NSTextView in NSScrollView in NSTabViewItem
  • Index(es):
    • Date
    • Thread