Scrolling Field with Scroller Extra Space

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
cenglish
Posts: 34
Joined: Wed May 11, 2011 6:44 pm
Location: LA, USA

Scrolling Field with Scroller Extra Space

Post by cenglish » Mon Oct 31, 2011 11:43 pm

I am having a very strange thing happen when using the mobGuI scroller with the scrolling field. I setup a scroller from the mobgui controls exactly like shown in the video, put a scrolling field in it and everything. On my preOpenCard script, I am pulling data from a web service and filling the scrolling field with a list of names. I am also putting in the alphabet with this list of names in order to use a "quick jump" index on the side of my scroller. When I open the card for the first time, everything works flawlessly, smooth scrolling, quick jump works, it's great. However, I have the scrolling field setup as a List behavior so that I can select a certain name from the list, and upon selection, I move to the next card, using that selectedText for something on the next card. Simple enough right? Well my problem is that if I scroll down before making a selection, say to the letter S, and make a selection that starts there, when I come back to this card, the scroller updates to the top....... BUT puts a TON of extra space above my list and cuts off half of my list at the bottom. I have tried putting empty into the list before pulling the data again, I have tried making sure it wasn't leaving spaces, I have tried near about everything I can think of but no matter what I do, I get the same results. I have also tried scrollerToTop "My Scroller" and scrollerUpdate"My Scroller", and these seem to have no effect. The most it will do is reset the words to the top of the scroller GROUP, but when it comes to the scrolling field, there's still a bunch of empty lines above all of my text. Any feedback would be greatly appreciated. Also, I am running LiveCode 5.0.0, with MobGui 0.24 on Snow Leopard.

Thanks in advance

--Colt

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7257
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scrolling Field with Scroller Extra Space

Post by jacque » Tue Nov 01, 2011 9:12 pm

I just spent 2 hours debugging exactly the same thing. The only thing that worked was to set the vScroll of the group to 0 on closecard (or maybe in your case, you need to set the scroll of the field.) That means when returning to the card, it will always be scrolled to the top, but that's better than the extra empty space.

I'm not sure this is a MobGUI issue, BTW. I wasn't using MobGUI for my scroller object.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

cenglish
Posts: 34
Joined: Wed May 11, 2011 6:44 pm
Location: LA, USA

Re: Scrolling Field with Scroller Extra Space

Post by cenglish » Tue Nov 01, 2011 9:32 pm

Wow Thanks SO much! That worked. I just set the vScroll of group "myScroller" to 0 on closecard and that got rid of all the extra space. Now the only glitch left is when I come back it does reset the top visually, but when I go to scroll, it picks up the scrolling where I had made my selection. But again, still no empty space in the list! I think the glitch might just be something I had added in when trying to debug the issue originally. Thanks again though. Crazy how such a large annoyance can take hours to figure out it's one line of code to solve. ha

Post Reply

Return to “MobGUI”