Getting a Label Field to Scroll with Another Field

Andre.Bisseret Andre.Bisseret at inria.fr
Mon Mar 15 12:34:03 EDT 2010


Le 15 mars 10 à 16:29, Gregory Lypny a écrit :

> 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.

Bonjour Gregory,

You might try to set your label field "right aligned" (pane Text  
formatting of the inspector).
(By default, a label field is "left aligned").

Not sure that a label field be optimum if you need it scrolling. If  
the change "right align" does not fix your problem, then try a normal  
text field instead for you columns headers, I am pretty sure that your  
"on scrollBarDrag" would works well.

Best regards from Grenoble

André




More information about the use-livecode mailing list