Author Topic: Scrollable Vertical Text Area  (Read 1780 times)

zibelas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Scrollable Vertical Text Area
« on: November 13, 2016, 11:46:43 AM »
What i did:

- have one scroll view
- have a child label, collider and drag ui script.
- text is a long lorem ipsum.

If i set overflow to resize freely and scrollview unrestricted, it works. But how do i set it up, that the text gets rendered if i just want to scroll vertically? Either clamp content or resize height on the label still allows to drag the label around but there is no more new text, only the text that was before there gets dragged. 


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollable Vertical Text Area
« Reply #1 on: November 14, 2016, 06:50:21 AM »
You specify the movement style on the scroll view -- just select it, it's the "Movement" field. Change it to Vertical. Not sure what this has to do with label overflow?

zibelas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Scrollable Vertical Text Area
« Reply #2 on: November 14, 2016, 09:00:13 AM »
Thats what I mean, if the scrollview is unrestricted, the text gets rendered while scrolling (Mainly sideways, since the lorem ipsum is long). If I set it just to vertically, it's not working. The label is moving but it looks just like a snap of the displayed text is dragged, no new text appears.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollable Vertical Text Area
« Reply #3 on: November 15, 2016, 09:08:44 AM »
I really don't understand what you mean there. A normal scroll view is set up like this:

- Background sprite (collider, Drag scrollview)
--- ScrollView / Panel
------ Content (collider and drag scroll view script here too)

With the scroll view set to Vertical style, you will only be able to move it up and down. I am not sure what "a snap of the displayed text is dragged" means.

zibelas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Scrollable Vertical Text Area
« Reply #4 on: November 15, 2016, 12:21:51 PM »
Own stupidity. I wanted to make a video of the effect, but it was working in a new project as expected. From there I worked backwards to find out what was wrong.

-> The max lines count property was set to 4 (and that was as well as how many lines were displayed at the start). After setting it to 0, it worked like it should.

Thank you for your time.