Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

adjusting subviews : NSTextView in NSScrollView in NSTabViewItem



        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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.