Widget 2.0 newScrollView - takeFocus() method?

I keep checking, it hasn’t.  Somewhat frustrating to see a new library released missing important functionality from the old one.  I’m still using Widgets 1.0 for this reason.

We are working on a way to make this more built in, as opposed to the hack which was takeFocus.

For now, if you return false in the moved phase of your touch handler, in the object’s listener (that you inserted into the scrollView) you can achieve a similar effect to takeFocus.

@Danny

any updates on whether onDrag parameter will be brought back?

Thanks Danny. I used the return false method but my button widgets stay on the overFile state. However the scrolling does work. Do you guys have any idea of a time frame on the solution you mentioned? I don’t mean to push, I know you guys are busy with a million requests.

Thanks again for your help.

Any chance this is going to be added before the daily builds stop for the next public release? It is very hard to make a scrollview full of buttons right now.

any update?  

Yes, see this: http://forums.coronalabs.com/topic/33579-info-scrollview-take-focus-is-coming-back/

Thanks Danny - does this mean it will be automatically included as part of widget.newButton()?

Or will we have to include the code in the “moved” phase of the event handler for the button? If so, can we still use it with the 9 slice widget buttons or am I going to have to make my own image buttons?

Thanks,

Ian

You will call takeFocus() in the “moved” phase for widget buttons also. This is subject to change as we can automatically do this for widget buttons but there is always the point that everyone has a different opinion on when the button should pass focus back to the scrollView so for now you manage it from your code.

Thanks

Thanks Danny. Any idea when this will be implemented?

TakeFocus is already implemented (locally) if your question is when will it automatically work with buttons, I guess that just depends on how many people want it.

Thanks

Ok great so with the latest daily build I can use TakeFocus in the same way I used to (it was taken out for a while)…?

Thanks.

No sorry, by locally I meant on my computer. It will be available very soon :slight_smile:

Ah okay! Great - look forward to it. Thanks.

Hi Danny

Can you do a post on this thread when it is released?

Is there a work around for the moment re how to push-hold-drag backwards and forwards items within a scroll view? Or was takeFocus the only way to do this? Assuming we have buttons in the scroll view that work separately if you click on them.

any news about takeFocus behavior in scrollView 2.0?. It a essential feature for corona user. Thank you.

Agree - also see my other thread on this for a temp solution from Danny. Would be a very welcome addition if this was all built in though.

http://forums.coronalabs.com/topic/33204-buttons-in-scrollview-not-registering-tap-correctly/#entry172939

Thanks!

Ian

Furthermore the scrollBarColor does not work and the scrollBar does not move properly. Widgets 2.0 are giving me headaches instead of solutions  :frowning: . I am using version 2013.1075.

scrollView = widget.newScrollView { width = 420, height = 230, scrollWidth = 0, scrollHeight = images.height, hideBackground = true, maskFile= "imagenes/maskExtras.png", scrollBarColor = { 255,255,255,100}, horizontalScrollDisabled = true }

scrollBarColor was depreciated. The scrollbar is now constructed via 3 images from an imageSheet.

Please see the migration guide: http://docs.coronalabs.com/daily/api/ (under the widget section)

Can we get an update on when this will make it into the daily builds?