How to make a white box with a blue background that i can write in.
Author |
Message |
Mr.White
|
Posted: Sat Mar 26, 2011 12:56 pm Post subject: How to make a white box with a blue background that i can write in. |
|
|
What is it you are trying to achieve?
How to make a white box with a blue background that i can write in. I want a blue background (55) and yellow writing at the top left and a white box in the lower right that i can write the characters and initials but when i try to do both either the text in the top left gets a white background over it or the lower right gets a blue background. Also how to get the initials of a name when i ask for the first and last name.
What is the problem you are having?
I try to use Draw.FillBox but it does not go over the text.
Describe what you have tried to solve this problem
changing the order of the commands
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using
4.1.1 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Raknarg
|
Posted: Sat Mar 26, 2011 2:36 pm Post subject: RE:How to make a white box with a blue background that i can write in. |
|
|
Well, you could use Font.Draw instead. If you try to use strings and draw statements at the same time, i find it screws up a lot. |
|
|
|
|
|
Raknarg
|
Posted: Sat Mar 26, 2011 2:49 pm Post subject: Re: How to make a white box with a blue background that i can write in. |
|
|
so you would have someting like this, i think:
Turing: |
var FirstName, LastName : string
var font : int := Font.New ("Ariel:10")
put "What is your first name?"
get FirstName
put "What is your last name?"
get LastName
cls
colourback (55)
for row : 1 .. 25
for column : 1 .. 80
put " " ..
end for
end for
Draw.FillBox (500, 0, 639, 100, 0)
locatexy (510, 90)
colourback (0)
put length (FirstName ) + length (LastName ), " characters"
Font.Draw ("Hello " + FirstName + " " + LastName, 0, maxy - 10, font, yellow)
|
Also, if you want to get the first initial, yo would use FirstName (1) and LastName (1). |
|
|
|
|
|
Mr.White
|
Posted: Sat Mar 26, 2011 6:21 pm Post subject: RE:How to make a white box with a blue background that i can write in. |
|
|
ya, thanks alot man |
|
|
|
|
|
Lucas
|
Posted: Sat Mar 26, 2011 8:21 pm Post subject: RE:How to make a white box with a blue background that i can write in. |
|
|
instead of :
for row : 1 .. 25
for column : 1 .. 80
put " " ..
end for
end for
why not just use:
Draw.FillBox (0, 0, maxx, maxy, 55)
? |
|
|
|
|
|
Raknarg
|
Posted: Sat Mar 26, 2011 8:59 pm Post subject: RE:How to make a white box with a blue background that i can write in. |
|
|
Cause i was only adding the Font statement |
|
|
|
|
|
|
|