Re: scrolling woes
Re: scrolling woes
- Subject: Re: scrolling woes
- From: Quincey Morris <email@hidden>
- Date: Sat, 20 May 2017 11:02:26 -0700
On May 20, 2017, at 06:00 , J.E. Schotsman <email@hidden> wrote:
>
> I had a text field within a tab view item whose text was getting too large.
Too large, as in: there are multiple lines of text whose total vertical height exceeds the height of the text field?
> So I embedded it in a scroll view. No matter what I tried in the xib editor, I couldn't get the scrolling to work.
Well, no, of course not. A text field is a control, so you put the control in a scroll view. The control itself isn’t bigger than the height available, just the text within the control. Since the scroll bar acts on the control, it doesn’t scroll the text.
> Does this have to be so hard?
I went to a (macOS) test project, dragged an editable text field into the main window, and changed its Layout attribute from “scrolls” [== scrolls horizontally] to “wraps” [== scrolls vertically]. When I run the app and type more than one line of text, it scrolls down as I type enough text. If I use the up and down arrow keys to move around the text, it scrolls to keep the selection visible.
Certainly, there is no scroll bar, but in what sense doesn’t it scroll?
_______________________________________________
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