Setup a Scrollbar?

Rob Cozens rcozens at pon.net
Thu Apr 20 11:08:49 EDT 2006


Hi Scott,

> My problem is getting the
> thumb correctly sized so, for example, if the field holds 14 items and 
> the
> lines number 15, you get a fairly large thumb, instead of the tiny 
> version
> when its size is set to 1.

If you are working with a scrolling field, the thumbSize adjusts 
automatically to the amount of text in the field.  Create a scrolling 
field with the formattedHeight of the text = to the the field's 
adjusted height...there will be no visible thumb.  Add one line of text 
and you have a fat thumb that gets slimmer with each line added to the 
field.

If you are using a scrollBar control instead of a scrolling field, this 
works for moi:

set the thumbSize of scrollBar "Index Scroll" to 
trunc(maxSize*(visibleLines/linesOfImages))
get visibleLines * imageHeight
set the pageInc of scrollBar "Index Scroll" to it
set the lineInc of scrollBar "Index Scroll" to imageHeight

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)




More information about the use-livecode mailing list