make list field auto scrolling

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ivaho
Posts: 37
Joined: Tue Feb 14, 2012 2:19 pm

make list field auto scrolling

Post by ivaho » Sat Dec 08, 2012 12:35 pm

Hi,

I have a list filed that gets his updates from another program, but how to make it scroll automaticly so it keeps displaying the last line that was added.

Klaus
Posts: 14190
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: make list field auto scrolling

Post by Klaus » Sat Dec 08, 2012 1:15 pm

Dag Ivaho,

...
set the scroll of fld X to (the formattedheight of fld X - the height of fld X)
## Should do the trick
...

Best

Klaus

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: make list field auto scrolling

Post by bn » Sat Dec 08, 2012 1:16 pm

Hi ivaho,

the easiest way to scroll to the bottom of a scrolling list field is to set its vScroll to a ridiculous high number like

Code: Select all

set the vScroll of field "myListField" to 100000
after adding the new data

Kind regards
Bernd

Edit: Klaus was faster...
two ways of achieving the same.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: make list field auto scrolling

Post by bn » Sat Dec 08, 2012 1:34 pm

Hi ivaho,

Disclaimer: advertising for a free product by poster :)

if you want to add alternating line colors to your list field you could easily do so by looking at:
alternating line colors.png
alternating line colors.png (22.82 KiB) Viewed 3417 times

http://revonline2.runrev.com/stack/661/ ... ipes_0_0_5

Kind regards
Bernd

Post Reply