Author Topic: Scroll View (Drag Scroll)  (Read 2858 times)

AlexeyTsoy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
Scroll View (Drag Scroll)
« on: June 17, 2016, 01:12:41 AM »
Hello! How can i scroll without draggable effect only by mouse scroll wheel? With attached drag scroll view script i can scrolling by drag and mouse wheel, I need to turn off the draggable effect...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scroll View (Drag Scroll)
« Reply #1 on: June 18, 2016, 05:08:04 AM »
Examine the UIDragScrollview script and make your own that only includes the parts you want (OnScroll).

jezzurp

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Scroll View (Drag Scroll)
« Reply #2 on: June 21, 2016, 12:04:05 PM »
Hi Aren

I have just been reading through your post http://www.tasharen.com/?page_id=4444#respond and googling around this subject, hope you can help...

I am working on an element that is anchored to other elements, and depending on screen resolution, will change size. The area needs to be clipped so that the chat messages are clipped...

My problem is this: it seems, unless I'm missing something, that a scroll/clip area has to have absolute dimensions to clip... i.e. I cannot set the clip area to be anchored to it's container's dynamic size?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scroll View (Drag Scroll)
« Reply #3 on: June 24, 2016, 01:17:30 AM »
To its container? No... when you calculate the bounds of something, it includes the children, so you would be including your own bounds.

Has to be a sibling instead.

jezzurp

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Scroll View (Drag Scroll)
« Reply #4 on: July 01, 2016, 04:12:04 AM »
Sorry, not really following your answer... Are you saying a flexible/relatively sized scroll view is not possible?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scroll View (Drag Scroll)
« Reply #5 on: July 01, 2016, 11:29:27 PM »
Sure it's possible. As I said, whatever is anchored / resized needs to be a sibling of the content. It can't be a child of that content.

You can't have some widget resizing its size based on the dimensions of its parent, as it would include its own dimensions. You'd be resizing a widget based on its own dimensions -- it makes no sense.