Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Text Question

Author
Message
LostSoul54
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 10th Jul 2003 08:47
This will sound like a real noob question, but I haven't found an answer anywhere else.

Is there a command to remove text once you output it to the screen using: text, x, y, string? I want to replace the text with another line and it just overwrites the previous text. How do I clear the old text, to be replaced by the new? After a: suspend for mouse command click is when I want the change to happen.

Thank you in advance
It's easy not to get lost when you have no idea where you are going
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 10th Jul 2003 09:04
u could do

cls

but that would erase the whole thing

JesterDev
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location:
Posted: 10th Jul 2003 10:18
How about setting the text to opaque: Set Text Opaque
Of course this will only set the text to the color of your
current background.. I think.

ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 10th Jul 2003 11:07
you could paste the same string in a different colour on top of your old one like this


hope that helps

hi guys
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Jul 2003 13:25 Edited at: 10th Jul 2003 13:28
or if your background is detailed then use get bitmap to grab the area you are going to write over and when you want to change it then put the section you grabbed back and then write over it again, eg

sync on:sync rate 0:hide mouse
for i=1 to 1000
ink rgb(rnd(256),rnd(256),rnd(256)),0
circle rnd(500),rnd(400),rnd(300)
next i
for i=1 to 1000
sync
next i
create bitmap 1,105,25
copy bitmap 0,1,100,100,200,120,1,1,101,21
do
text 100,100,"i am a"
sync
wait 500
copy bitmap 1,0,1,1,101,21,100,100,200,120
text 100,100,"message"
sync
wait 500
loop

or something like that, but I can`t get DB to admit that one of the bitmaps exists at the moment, 0 should be the screen, but even renumbering them I get "bitmap does not exist at line 14" GRRR!

Mentor.

ooops! I left in a test loop, you can kill the 1000 sync`s near the start

Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Jul 2003 16:35
o_O I would just use CLS and replace everything every loop... thats the easiest way... or ... =P just set the background on your text to black...and it should work... but if the new string isnt the same size... it will have parts of the other string comming out from under it... I'd say the least painful way would be the CLS...

EVERYONE LOVES THE PUFF!... =\
LostSoul54
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 10th Jul 2003 18:13
Ok, I will try it out tonight x-d

Thanks for all of your help guys

It's easy not to get lost when you have no idea where you are going

Login to post a reply

Server time is: 2024-09-20 15:49:17
Your offset time is: 2024-09-20 15:49:17