Getting a Label Field to Scroll with Another Field

Gregory Lypny gregory.lypny at videotron.ca
Mon Mar 15 11:29:05 EDT 2010


Hello Everyone,

I have a list field called Table A.  It has a horizontal scrollbar, a vertical grid and tab stops set to 80.  The contents are tab delimited, and the formatted width of many of the items in a line, particularly the last item, is much greater than 80.  I also have a label field called Titles A directly above Table A.  It has column titles in it, and so it has the same vertical grid and tab stops as Table A.

I'd like those column titles in Titles A to be synchronized with the horizontal scrolling of Table A.  As a start, I tried the following.

on scrollBarDrag
   set the hScroll of fld "Titles A" to the hScroll of fld "Table A"
end scrollBarDrag

It didn't work.  The titles scrolled only a little.  I figure that is because the content of the lines of Table A is much wider than that of Titles A.  I tried inserting some blank titles at the end Titles A but that didn't help either.  The content of Table A will be changing, so I'd like the synchronized scrolling to handle that.

Any tips would be most appreciated.

Regards,

Gregory



More information about the use-livecode mailing list