Author Topic: Buttons in a scroll view, how to?  (Read 1389 times)

Zniper69

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Buttons in a scroll view, how to?
« on: February 10, 2014, 04:47:37 AM »
Hi

I'm sure that there's some information about this somewhere, but I seem to not have been able to dig something up that discusses my problem here.

So my goal is simple.. I have a scrollview (clipped panel), and I have some buttons that I want to:
A) Be able to scroll up/down in the scrollview, so the user can reach all buttons by scrolling.
B) Be able to interact with the buttons (i.e. click them).

So the problem arises as such:
If the user presses a button directly, he will not be able to drag the scroll view. If he presses outside the button collider (but still inside the scroll view) he can scroll.

I would like it so that if a user presses a button, but does not release and instead begin dragging, then he should be able to scroll the scroll view and the interaction with that button will be forgotten so to speak..

I hope that this makes sense. Any inputs on how to achieve this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Buttons in a scroll view, how to?
« Reply #1 on: February 10, 2014, 04:55:38 PM »
Just attach UIDragScrollView to buttons as well.