Text field scrollbars

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
akshu
Posts: 5
Joined: Wed Jun 01, 2011 5:02 pm

Text field scrollbars

Post by akshu » Thu Jun 30, 2011 3:57 pm

Hey guys,

I had a question about text fields. So I have 6 text fields and I want to make it so that if the scroll bar is used on one of the fields (to go to the next thing) it applies to all the other fields. Is there any way for me to do this?

Thanks!
:)

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

Re: Text field scrollbars

Post by Klaus » Thu Jun 30, 2011 4:05 pm

Hi akshu,

put this into the script of your field that HAS the scrollbars set:

Code: Select all

on scrollbardrag
  lock screen

  ## Create a COMMA delimited list of the names of the fields that should scroll "in sync"
  ## and then loop through this list
  repeat for each item tField in "field 1 without scrollbar,field 2 without scrollbar,field 3 without scrollbar"
    set the scroll of fld  tField to the scroll of me
  end repeat
  unlock screen
end scrollbardrag
Best

Klaus

Post Reply