How can I edit the widget Scrollview code?

I need to do some tests and maybe add some new behaviours to the scrollView.

At first, I did some changes to this code: corona/platform/resources/widget.lua at master · coronalabs/corona · GitHub

Not sure if it’s normal, but first: it’s still using deprecated V1 Graphics APIs. Also, it seems a few things don’t work: I’m unable to set “verticalScrollDisabled” or “horizontalScrollDisabled” via the widget’s parameters. I can however “hard code them” directly into the widget source code though.

So i’m wondering: is this the good way to customize existing widgets? Also, is this file the latest up to date code?

Cheers!

This is sub-repo widget that solar2d use.
It is also very old.

1 Like

Got my link from this Solar2D Documentation page: Solar2D Documentation — API Reference | Libraries | widget. So I guess it’s outdated?

I’m not familiar GitHub (I know…), but looking at the file “widgetLibrary/widget_scrollview.lua”, on the right it says “Sync to 2018.7.4” (7 Years Ago). Isn’t it older than the file I linked (5 years ago)?

Should I download “widgetLibrary/widget.lua” + “widgetLibrary/widget_scrollview.lua” and require them in my project to create a custom scrollview ?

Yeah, you can do that.
It just a Lua module. Feel free to modify it.