Syntax
xBool ScrollBarUpdate( ScrollBar *scrollBar );
Arguments
scrollBar the scroll bar.
Return value
T on success, or F if the object is NULL.
Description
The update callback runs once before recalculation, even when the thumb will stay in place. The calculation uses the current item, total and track length after the callback returns.
For a track and item total of at least two, the position is `round( current * ( ( barLength - 1 ) / (double) total ) + 1 )` limited to `1` through `barLength`. If it moves, the old cell is repainted as track and the thumb is drawn at the new cell.
For a shorter track or smaller total, the call succeeds and retains the stored thumb position without drawing. Use `ScrollBarDisplay()` for the initial drawing or to redraw the whole bar after geometry, color or style changes.