Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

scrollView with buttons, doesn't scroll
Started by Abdo23 Oct 10 2018 09:26 PM

4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Abdo23

[GLOBAL: userInfoPane.html]
Abdo23
  • Contributor

  • 110 posts
  • Corona SDK

I have a horizontal scrollView widget that contains a few buttons. The problem is when I touch a button and try to scroll, it doesn't register, but when I touch outside the buttons on the scrollViews's background, the scrolling works fine.

How can I solve this issue?



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,628 posts
  • Corona SDK

Didn't you already ask this question in 2017?

 

https://forums.coronalabs.com/topic/69922-buttons-in-scrollview-prevent-scrolling/



[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,363 posts
  • Corona SDK

I answered a similar question here (note I don't use widget buttons): 

https://forums.coronalabs.com/topic/74013-quick-question-scrollview-tap/

 

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/10/scrollers_buttons.zip



[TOPIC: post.html]
#4

Abdo23

[GLOBAL: userInfoPane.html]
Abdo23
  • Contributor

  • 110 posts
  • Corona SDK

 

Thanks for the answer. May I ask why do you use your own custom made buttons and functionality instead of widget buttons?



[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,363 posts
  • Corona SDK

Why not widget.* buttons? 

I have been around here since late 2011.  When I started, the widget library was:

  1. Not as functional as it is now.
  2. Closed source.

I wanted total control of how my code worked, total visibility so I could fix bugs, and I had the skills to make my own library, so I did.

 

I've used a variant of my SSK buttons (easyIFC) since then.

 

In my middle years as a Corona user, I found I needed buttons in a scroller.  I worked on it for a bit and decided to:

  • Use widget.newScroller() because it was better than my scroller code by then. 
  • Custom methodology for fixing the one button + scroller flaw.

 

That flaw is the difficulty to put buttons in a scroller and still keep the functionality of the scroller and buttons even if you click and drag on the buttons.




[topic_controls]
[/topic_controls]