Author Topic: ScrollView not restting to position  (Read 4031 times)

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
ScrollView not restting to position
« on: January 08, 2014, 09:03:00 AM »
Hi,

So I have a screen which contains a scrollview. It all works perfectly until i scroll up. The Reset Position is set to (0,251) but the scrollview is resetting itself to (0,283) which makes my UI look bad :(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView not restting to position
« Reply #1 on: January 08, 2014, 12:23:47 PM »
"Reset Position" value is in relative coordinates (relative to the size of the content). (0, 0) means top-left. (1, 1) means bottom-right.

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: ScrollView not restting to position
« Reply #2 on: January 09, 2014, 05:44:35 PM »
Thx for your reply Arenmook, but I still can't get this working on any of my ScrollPanels. These are the settings of one of my scroll view panels:



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView not restting to position
« Reply #3 on: January 09, 2014, 06:02:52 PM »
How are you resetting your scroll view? The reset position only kicks in when you call ResetPosition(). The actual restricting content within scroll view logic is done based on the dimensions of the content.

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: ScrollView not restting to position
« Reply #4 on: January 10, 2014, 04:04:00 AM »
How are you resetting your scroll view? The reset position only kicks in when you call ResetPosition(). The actual restricting content within scroll view logic is done based on the dimensions of the content.

Well actually i'm not doing anything with code right now, just making all the screens functional. So i'm not calling anything from the ScrollView.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView not restting to position
« Reply #5 on: January 10, 2014, 05:47:47 PM »
Ok then I don't quite follow. Scroll view lets you scroll the content until you reach the end of it, at which point it lets you keep scrolling, but with some resistance. Once you release the mouse button/touch, the scroll view will spring into place, hiding any excess space and basically clamping to the edge of the content.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: ScrollView not restting to position
« Reply #6 on: January 11, 2014, 06:27:11 AM »
You likely have a widget that's going outside the scroll area, like a label's draw area. That would make the scrollview move the content around to make it fit as best it can.

Try checking the sizes of your widgets.