Scroller with dynamic content
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Scroller with dynamic content
I have the need to create a scroller somewhat like a news feed
where I don't know before hand the amount of data that will be in it
in the past when I had this situation I created a webpage with the data
and loaded it using the web control
I can't use that method now since the app its going to be used mostly offline
and the data presented in the scroller is going to be already in the phone but
the order and the amount of data changes from time to time
any ideas on how to implement this?
thanks in advance.
Edd.
where I don't know before hand the amount of data that will be in it
in the past when I had this situation I created a webpage with the data
and loaded it using the web control
I can't use that method now since the app its going to be used mostly offline
and the data presented in the scroller is going to be already in the phone but
the order and the amount of data changes from time to time
any ideas on how to implement this?
thanks in advance.
Edd.
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scroller with dynamic content
Hi.
When you say "scroller", do you mean a field with text that scrolls down automatically? That is easy. If you want something like a teleprompter, where the rate of scrolling is manually controlled, well, that is easy too.
Or something entirely different?
Craig
When you say "scroller", do you mean a field with text that scrolls down automatically? That is easy. If you want something like a teleprompter, where the rate of scrolling is manually controlled, well, that is easy too.
Or something entirely different?
Craig
Re: Scroller with dynamic content
you have to scroll down yourself
the problem is I don't know how to calculate the total height of the scroller content beforehand since the
items in the scroller change
the problem is I don't know how to calculate the total height of the scroller content beforehand since the
items in the scroller change
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scroller with dynamic content
Hmmm.
You know that you can always retrieve the number of lines in a scrolling field, right? And that you can retrieve the "scroll" of such a field. And that if you know the textHeight of the field, you can determine the relative "amount" of scroll that field currently exhibits, even on the fly.
But is that what you needed?
Craig
You know that you can always retrieve the number of lines in a scrolling field, right? And that you can retrieve the "scroll" of such a field. And that if you know the textHeight of the field, you can determine the relative "amount" of scroll that field currently exhibits, even on the fly.
But is that what you needed?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Scroller with dynamic content
In the Dictionary see the unboundedHScroll and unboundedVScroll properties.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scroller with dynamic content
You can also use the "vScroll" property in a "scrollBarDrag" handler to see where you are in the scroll process. This value could be scaled in any way you desire.
Craig
Code: Select all
on scrollbarDrag
put the vScroll of me
end scrollbarDrag
Re: Scroller with dynamic content
Thanks guys
Those suggestions actually resolved my problem
Thank you again
Those suggestions actually resolved my problem
Thank you again