Computer Science Canada

Horizontal scrollbars

Author:  Angel [ Sat Jan 03, 2004 5:17 pm ]
Post subject:  Horizontal scrollbars

Can someone please explain this code to me?

code:
% The "GUI.CreateHorizontalScrollBar Example" program.

import GUI
 
View.Set ("graphics:300;60,nobuttonbar")
var scrollBar : int

procedure ScrollBarMoved (value : int)
    Text.Locate (2, 3)
    put "Horizontal Scroll Bar: ", value : 4
end ScrollBarMoved

scrollBar := GUI.CreateHorizontalScrollBar (10, 10, 250,
    50, 150, 50, ScrollBarMoved)
loop
    exit when GUI.ProcessEvent
end loop


Thanks.

Author:  Tony [ Sat Jan 03, 2004 6:18 pm ]
Post subject: 

basically there's this GUI scrollbar. Each time you move it, it triggers "ScrollBarMoved" function (well prosedure rether) which displays the value of the scrollbar.


: