
-----------------------------------
Angel
Mon Jan 05, 2004 10:57 pm

How can I put in a vertical scrollbar into my program?
-----------------------------------
I tried putting in a scrollbar into my program using this GUI code:

% The "GUI.CreateVerticalScrollBar Example" program.

import GUI

View.Set ("graphics:100;230,nobuttonbar")

var scrollBar : int

procedure ScrollBarMoved (value : int)
    Text.Locate (9, 7)
    put "Scroll"
    Text.Locate (10, 8)
    put "Bar"
    Text.Locate (11, 8)
    put value : 3
end ScrollBarMoved

scrollBar := GUI.CreateVerticalScrollBar (10, 10, 180, 50, 150, 50,
    ScrollBarMoved)
loop
    exit when GUI.ProcessEvent
end loop

The code works on its own, but not in my program. Does anyone know of any other ways I can put in a scrollbar?

-----------------------------------
Tony
Mon Jan 05, 2004 10:59 pm


-----------------------------------
my guess is that you're placing your GUI.ProcessEvent loop in the wrong place. It should be at the end...

-----------------------------------
Angel
Mon Jan 05, 2004 11:09 pm


-----------------------------------
I tried that. I pasted my full program in the other post so maybe you can try the code on your computer or something. I put it at the beginning of the program (the whole code) and I also tried to do what you did and it still gives me a whole bunch of errors.
