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

Username:   Password: 
 RegisterRegister   
 word wrap?????
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
n00b.skillz




PostPosted: Fri Dec 22, 2006 9:04 pm   Post subject: word wrap?????

kk i'm just wondering if there is such a thing as word wrap in the sense that if i use font.draw and the sentance doesn't fit in one line it will automatically jump to the next because i'm writin font.draw but it's in a procedure so if it can't then i have to redo everything.....
Sponsor
Sponsor
Sponsor
sponsor
Hackmaster




PostPosted: Fri Dec 22, 2006 10:03 pm   Post subject: (No subject)

I'm pretty sure that it will... but it might cut your words in half.

Also, you could just write some sort of thing that does that cleanly. something that uses strlen to determine if the word is going to hit maxrow, and if it is, then move to the next line. simple stuff.
n00b.skillz




PostPosted: Fri Dec 22, 2006 10:49 pm   Post subject: (No subject)

kk well the fon.tdraw does not do that automatically ..... and can you please explain how to use maxrow/ wut are it's parameters/where i can find more help?? thx alot
Clayton




PostPosted: Sat Dec 23, 2006 11:32 am   Post subject: (No subject)

maxrow (as well as maxcol) is a constant. It is set to whatever the maximum number of rows are in your run window (25 I believe by default in text mode). Seeing as you are using Font.Draw however, you will be working in graphics mode, and therefore the constants maxrow and maxcol will be of no use to you. Instead, you could probably try to scale the words (if you are using View.Set ("graphics:max;max") ) by checking how large maxx and maxy are at runtime. Other than that, the best you could do is keep the run window size static, and eyball it.
n00b.skillz




PostPosted: Wed Dec 27, 2006 10:17 pm   Post subject: (No subject)

thx alot...... yet another thing we didn't learn in class... Razz
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: