control hscroll of one field by another field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
control hscroll of one field by another field
I would like that when i scroll one field another field with automatically scroll along with the first field. Its because i want to have a title field for rows in a table that will remain on top when scrolling down but when scrolling sideways the titles in the upper field will remain locked with the rows in the table. in excel it would be like clicking "freeze panes"
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: control hscroll of one field by another field
This is done by setting the scroll of your "slave" field to the scroll of your "master" field. Put this in the script of the "master":
Now this assumes, for example, that the textSize of each field is the same. You can probably see why. Of course, one can fix that as well.
Right?
Craig Newman
Code: Select all
on scrollbarDrag
set the scroll of fld 2 to the scroll of me
end scrollbarDrag
Right?
Craig Newman
Re: control hscroll of one field by another field
ah ha! i was using set hscroll of fld "title" to the hscroll of me but it was the scrollbarDrag that was the key piece i needed. thanks
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: control hscroll of one field by another field
Hi.
Craig
You probably could, but the message is the thing, not the property, if you know what I mean....i was using set hscroll of fld "title" ...
Craig