Computer Science Canada

making a scrollbar

Author:  awesomej01 [ Sat May 01, 2004 7:04 pm ]
Post subject:  making a scrollbar

I 'm makin a word processor for my final project in computer science and my teacher said we can't use GUI. As you all know that in word processors you have scrollbars. I was just wondering if anyone can give me some suggestions on how to make a vertical scroll bar that allows you to scroll up and down to read your text without using GUI.

Author:  Delos [ Sat May 01, 2004 7:06 pm ]
Post subject: 

setscreen ("text")

Very HappyVery Happy

Sorry...that was a bad joke.

Umm...well, look up a bit on Mouse. commands, arrays, and hell, even processes.

That and basic drawing commands. Like Draw. commands.

Author:  Paul [ Sat May 01, 2004 7:12 pm ]
Post subject: 

setscreen ("graphics: max; 2000")

Author:  Tony [ Sat May 01, 2004 9:03 pm ]
Post subject: 

Confused scroll bar is GUI... seeing as its a graphical user interface Rolling Eyes So if you're not allowerd to draw any interfaces, what you could do is have keyboard scrolling... such as with pgUp/pgDown keys

Author:  Cervantes [ Sun May 02, 2004 4:16 am ]
Post subject: 

glad you remembered that trick paul Smile
i suppose the best way to use it would be like so

code:

var numberofpages := 3
const pixelsperpage := 500
var screenheight := numberofpages * pixelsperpage
setscreen ("graphics:max," + intstr (screenheight)) %this line would have to be inside the main loop
put "random text so that the prog actually loads a bit"


: