
-----------------------------------
Angel
Sat Jan 03, 2004 5:17 pm

Horizontal scrollbars
-----------------------------------
Can someone please explain this code to me?

% 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.

-----------------------------------
Tony
Sat Jan 03, 2004 6:18 pm


-----------------------------------
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.
