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

Username:   Password: 
 RegisterRegister   
 Adding location values in font.draw in loops/Scroll bars?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Vissar




PostPosted: Mon Nov 06, 2006 10:57 am   Post subject: Adding location values in font.draw in loops/Scroll bars?

Is it possible to output text with font.draw so that when the loop gives it a new number, the text is moved so all the numbers are not overlapped?


This is the basic program. Very simple.

var number:int:=-100
loop
put number
number:=number+2
exit when number=100
end loop


That didn't work out too well for me so I tried a verticle scroll bar. That didn't work out either. The only thing the scroll bar did was make the loop restart ((I used the scroll bar code off the turing help)). There was no way to see the numbers at the top for more than a fraction of a second.

The goal here, basicly, is to make the output "look good" as my teacher so simply puts it. Any ideas?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Nov 06, 2006 11:18 am   Post subject: (No subject)

yes, Font.Draw takes x,y paremeters, so you can output text where-ever you want
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Vissar




PostPosted: Mon Nov 06, 2006 12:46 pm   Post subject: (No subject)

Tony wrote:
yes, Font.Draw takes x,y paremeters, so you can output text where-ever you want


Yes, I'm quite aware of this, but is it possible to make the looped outputs change the x, y parameters without having to manually do it myself 100 or so times?
ericfourfour




PostPosted: Mon Nov 06, 2006 3:01 pm   Post subject: (No subject)

Easy. Each parameter (text, x, y, font, and colour) can be a variable. Just make x and y a variable and use them instead of hard coded values.
Piro24




PostPosted: Mon Nov 06, 2006 4:20 pm   Post subject: (No subject)

Try it out for youself...You can make the co-ordinates in Font.Draw variables so just apply what you have into your code for that...
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  [ 5 Posts ]
Jump to:   


Style:  
Search: