ScrollView Widget, How to prevent scrolling?

Widget2.0: To prevent scrolling in ScrollView Widget, How do you I do? isLocked of Widget1.0. [import]uid: 174238 topic_id: 37037 reply_id: 67037[/import]

Add this to your scrollView constructor:

  
isHorizontalScrollDisabled = true,  
isVerticalScrollDisabled = true,  
  

This information is all documented in our daily build docs, which you can find here: http://docs.coronalabs.com/daily/api/ [import]uid: 84637 topic_id: 37037 reply_id: 145297[/import]

If you want to change while using ScrollView Widget, How do you do I do?

------ 2013.1033 Corona Docs
Widget 1.0 ScrollView:

Overview
If set to true, the ScrollView will be prevented from scrolling.

Example
scrollView.isLocked = true

Widget 2.0 What do I do?
[import]uid: 174238 topic_id: 37037 reply_id: 145370[/import]

@recht1205:

I already told you in my reply above.

Setting those two properties to true is the equivalent to scrollView.isLocked in widget 1.0. [import]uid: 84637 topic_id: 37037 reply_id: 145391[/import]

Danny, I’m having lots of trouble getting this to work. First, your example above shows this -

isHorizontalScrollDisabled = true,  
isVerticalScrollDisabled = true,  

But, if you look at the api documentation here - http://docs.coronalabs.com/daily/api/library/widget/newScrollView.html

it shows usage as horizontalScrollDisabled=true

Regardless, I’ve tried both ways and can’t get it to work. I’ve also tried isLocked to no avail. I’m basically trying to disable scrolling AFTER the scrollview has been loaded up. Any advice?

I just posted on this same topic here - http://developer.coronalabs.com/forum/2013/03/09/disabling-horizontal-scroll-scrollview

Thanks.

Brian
[import]uid: 141982 topic_id: 37037 reply_id: 145504[/import]

If you are trying to do it after…

scrollView.\_view.\_isHorizontalScrollingDisabled = true  

Should do the trick. [import]uid: 84637 topic_id: 37037 reply_id: 145509[/import]

Perfect!!! You rock Danny.

Brian [import]uid: 141982 topic_id: 37037 reply_id: 145510[/import]

scrollView._view._isVerticalScrollDisabled = true <= It does not work. [import]uid: 174238 topic_id: 37037 reply_id: 145740[/import]

recht - be sure and change the “scrollView” to the name of your scrollview object.

I’ve tested this and it works well. Thanks.

Brian [import]uid: 141982 topic_id: 37037 reply_id: 145771[/import]

Add this to your scrollView constructor:

  
isHorizontalScrollDisabled = true,  
isVerticalScrollDisabled = true,  
  

This information is all documented in our daily build docs, which you can find here: http://docs.coronalabs.com/daily/api/ [import]uid: 84637 topic_id: 37037 reply_id: 145297[/import]

If you want to change while using ScrollView Widget, How do you do I do?

------ 2013.1033 Corona Docs
Widget 1.0 ScrollView:

Overview
If set to true, the ScrollView will be prevented from scrolling.

Example
scrollView.isLocked = true

Widget 2.0 What do I do?
[import]uid: 174238 topic_id: 37037 reply_id: 145370[/import]

@recht1205:

I already told you in my reply above.

Setting those two properties to true is the equivalent to scrollView.isLocked in widget 1.0. [import]uid: 84637 topic_id: 37037 reply_id: 145391[/import]

Danny, I’m having lots of trouble getting this to work. First, your example above shows this -

isHorizontalScrollDisabled = true,  
isVerticalScrollDisabled = true,  

But, if you look at the api documentation here - http://docs.coronalabs.com/daily/api/library/widget/newScrollView.html

it shows usage as horizontalScrollDisabled=true

Regardless, I’ve tried both ways and can’t get it to work. I’ve also tried isLocked to no avail. I’m basically trying to disable scrolling AFTER the scrollview has been loaded up. Any advice?

I just posted on this same topic here - http://developer.coronalabs.com/forum/2013/03/09/disabling-horizontal-scroll-scrollview

Thanks.

Brian
[import]uid: 141982 topic_id: 37037 reply_id: 145504[/import]

If you are trying to do it after…

scrollView.\_view.\_isHorizontalScrollingDisabled = true  

Should do the trick. [import]uid: 84637 topic_id: 37037 reply_id: 145509[/import]

Perfect!!! You rock Danny.

Brian [import]uid: 141982 topic_id: 37037 reply_id: 145510[/import]

scrollView._view._isVerticalScrollDisabled = true <= It does not work. [import]uid: 174238 topic_id: 37037 reply_id: 145740[/import]

recht - be sure and change the “scrollView” to the name of your scrollview object.

I’ve tested this and it works well. Thanks.

Brian [import]uid: 141982 topic_id: 37037 reply_id: 145771[/import]

Should add this to the API docs.

Should add this to the API docs.