[SailfishDevel] Read-only TextArea: Always keep the lines added last visible
Dirk Zimmermann
me+sailfishos at dirkz.com
Thu Jan 8 16:44:47 UTC 2015
On 07.01.2015 12:06, Sami Kananoja wrote:
> Hi,
>
> This should do the trick:
>
> SilicaFlickable {
> id: flickable
> anchors.fill: parent
> contentHeight: textAreaLog.height
> contentY: Math.max(0, contentHeight - height)
> TextArea {
> id: textAreaLog
> readOnly: true
> text: "Test"
> width: flickable.width
> }
> }
>
> The contentY binding is the one that keeps the last line visible (but has some annoying side effects if you want to scroll the content manually - fixing that is left as home work :) )
>
Thanks, that worked :)
Dirk
More information about the Devel
mailing list