Scoll field issue when number of lines of text changes

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
scotttyang
Posts: 125
Joined: Sat Jan 31, 2009 12:01 am

Scoll field issue when number of lines of text changes

Post by scotttyang » Mon Dec 17, 2012 6:36 pm

I usually just do a workaround for this, but here is the basic problem...

In a scrollfield, let say I have 200 lines of text. But sometimes I need to only show 10 of the lines as I am filtering out all the words that start with the letter "A". When the scrollfield goes from 200 lines of text to only 10 lines....when scrolling down, the scroll field still acts like it has 200 lines of text when only there is 10. So one sees just empty lines while scrolling down. If I leave the card and comes back, then it fixes itself so the 10 lines of text won't scroll up any further.

Ive tried setting the height of the scrollfield with ...set the height of fld scrollfield to the formattedheight of fld scrollfield, but still the 10 lines of text still scrolls out of view.

any thoughts will be helpful...

Scott

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Scoll field issue when number of lines of text changes

Post by endernafi » Mon Dec 17, 2012 7:01 pm

Hi Scott,

I assume that you use mobile scroller control.
Do you update its rect and contentRect properties?

Code: Select all

mobileControlSet tControl, "rect", tUpdatedRect
mobileControlSet tControl, "contentRect", tUpdatedContentRect
Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

scotttyang
Posts: 125
Joined: Sat Jan 31, 2009 12:01 am

Re: Scoll field issue when number of lines of text changes

Post by scotttyang » Tue Dec 18, 2012 12:56 am

that did it thanks!

Post Reply