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

Username:   Password: 
 RegisterRegister   
 Object on top of another and text box
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
iproballer




PostPosted: Sat Jun 05, 2010 10:52 pm   Post subject: Object on top of another and text box

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<Answer Here>


Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
iproballer




PostPosted: Sat Jun 05, 2010 10:54 pm   Post subject: Re: Object on top of another and text box

Sorry guys I couldnt figure out the new thread format so ill post my question here. Hi guys, well im tryigng to put an object on top of another (drew a fillbox and wat to put another fillbox on top of it) but it does not appear as its hidden behind it or something. And also when I add text
locate(x,y)
put"Hello"

Why is there a small rectangle surrounding the text and going all the way through the other end of the screen and how can I get rid of it? Thanks in advnace, im new to the forum and it looks very helpful Smile
Cezna




PostPosted: Sun Jun 06, 2010 11:03 am   Post subject: Re: Object on top of another and text box

This rectangle is what is showing of the background.
When you use put, it clears the entire line you are putting on.
You get rid of this, type:
code:

put "Hello"..


As for the boxes, I would guess you are drawing them in the wrong order, or they are the same size, but I would have to see your code to give you any meaningful advice.

Instead of using put, try using Font.Draw, which uses this syntax:


code:

Font.Draw ("Hello", x position, y position, fontstyle, colour)

You declare font styles with this syntax:
code:

var fontstyle : int
fontstyle := Font.New ("Arial:40x20:bold,italic,underline")

or
code:

var fontstyle := Font.New ("Sans Serif:40:bold")


Using Font.Draw eliminates the showing of the background, gives you more precise control over positioning, gives you the control over the style and size of the text, and many other benefits.
Font.Draw can make your program look prettier, but for technical applications, it is sometimes best to use put.
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: