Re: A Stack of Editors
Re: A Stack of Editors
- Subject: Re: A Stack of Editors
- From: John Joyce <email@hidden>
- Date: Sun, 05 Oct 2014 01:59:42 +0900
> On Oct 4, 2014, at 11:27 AM, Charles Jenkins <email@hidden> wrote:
>
> I just asked a question about the NSStackView, but perhaps I’m looking at
>the wrong control altogether.
>
> What I’m trying to make is a scroll view containing a vertical stack of
>editors for RTF subdocuments. Each of the text views should size itself to
>fit the width of the scroll view, but grow vertically as much as necessary
>to display its full content.
>
> The more I think about it, the more I think what I need is a single-column
>table view within which each cell holds a text editor. But each row, text
>view, and text container should resize to fit the text held within. How can
>I achieve that?
>
> —
>
> Charles Jenkins
Are you trying to use NSTextFields or NSTextViews? Either way, you will probably
want to enable them to scroll as vertical height on a screen is limited.
At some point you will probably need to scroll vertically in the RTF document,
unless you have some limit on the actual amount of text and you know the screen
size of all users in advance.
You don’t want a window that exceeds the vertical height of a screen and you have
no way to know what size screen might be used in advance.
NSStackView in a scroll view should be easier in some ways than NSTableView
(if you want vertical resizing easily)
You could also do a NSSplitView with custom splitters.
However, it really sounds like you should consider a master-detail design if possible.
With say a table view to the left that is for selecting a section to work on, then
the section displayed to the right.
You could also do a master-detail design with NSTabView. (even tabless, using a
custom tab selector of some sort)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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