How to remove TextObjects.

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1400
Joined: Sun Feb 14, 2010 7:11 pm

How to remove TextObjects.

Post by Bugala »

I am having difficulty in figuring out how to remove TextObjects. There dont seem to be any RemoveTextObject or similar command. Closest thing to that is FreeTextObject, which i thought would also remove Text from screen, but it doesnt.

So is there any simple way to remove TextObjects from screen?
evil
Posts: 185
Joined: Mon Jun 14, 2010 1:38 pm

Re: How to remove TextObjects.

Post by evil »

To remove a textobject from your display simple use DisplayBGPicPart() with the coordinates and sizes of your textobject (get them with GetAttribute() ).
Alternatively you might create a sprite from your textobject instead of displaying it directly to the screen.
The sprite may be removed from the screen lateron useing removesprite (?)
Bugala
Posts: 1400
Joined: Sun Feb 14, 2010 7:11 pm

Re: How to remove TextObjects.

Post by Bugala »

Sounds it is then easier to use TextOut() and name it into text1, text2....
User avatar
airsoftsoftwair
Posts: 5887
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How to remove TextObjects.

Post by airsoftsoftwair »

If you use layers, just use Undo() or RemoveLayer(). Otherwise the solutions suggested by evil apply.
User avatar
Juan Carlos
Posts: 950
Joined: Mon Sep 06, 2010 1:02 pm

Re: How to remove TextObjects.

Post by Juan Carlos »

Bugala wrote:I am having difficulty in figuring out how to remove TextObjects. There dont seem to be any RemoveTextObject or similar command. Closest thing to that is FreeTextObject, which i thought would also remove Text from screen, but it doesnt.

So is there any simple way to remove TextObjects from screen?
There is a easy solution with a BOX you can use the Box command to draw a box over the text if you use the TextObject in a background without graphics, in this case with DisplayBGPicPart
Post Reply