Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How can I put in a vertical scrollbar into my program?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Angel




PostPosted: Mon Jan 05, 2004 10:57 pm   Post subject: How can I put in a vertical scrollbar into my program?

I tried putting in a scrollbar into my program using this GUI code:

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?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Jan 05, 2004 10:59 pm   Post subject: (No subject)

my guess is that you're placing your GUI.ProcessEvent loop in the wrong place. It should be at the end...
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Angel




PostPosted: Mon Jan 05, 2004 11:09 pm   Post subject: (No subject)

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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: