Re: Resizing an NSTextView Programmatically
Re: Resizing an NSTextView Programmatically
- Subject: Re: Resizing an NSTextView Programmatically
- From: Aki Inoue <email@hidden>
- Date: Thu, 16 May 2002 01:32:53 -0700
Alex,
Probably you're mislead by the way IB handles NSTextView.
Even if you disable the horizontal scroller in IB, the textview is still
inside of NSScrollView.
So, actually, you have to setFrame: on both scrollview & textview.
Note that you have to call -setVerticallyResizable:NO on your textview
if you really want to have the precise frame control; otherwise, the
layoutmanager might resize the view under you.
Aki
On 2002.05.15, at 20:39, Alex Keresztes wrote:
I want to be able to resize an NSTextView programmatically to a specific
size. I haven't been able to accomplish this correctly in my past
efforts,
so I decided to resort to the list.
To be able to test this specific functionality, I created a sample
application that is simply an NSTextView in a window, and I try to
resize
the TextView to 1/4 of the window size in the controller's awake from
nib.
The NSTextView only has its "selectable" and "multiple fonts allowed"
properties on in IB (meaning it is not editable and does not contain a
scrollview).
Someone suggested in the past to do a [textView setFrameSize: newSize]
but
that doesn9t work.
Any ideas/suggestions?
Alex
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.