adjusting subviews : NSTextView in NSScrollView in NSTabViewItem
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