Update characters on the same line issue with Adafruit 2.2 TFT LCD

I bought this nice TFT LCD display from Adafruit and the demo code works great, but I don't seem to find a way to display and update values on the same line: I want to display GPS data without them scrolling, but update on their place like:

Time: 12:34:45
Satellites: 4
Lat: 45.7654N
Lon: 123.54680W
Altitude: 34

And have the values refresh in place instead of scrolling down like i see in the serial monitor.

I tried this:

display.setCursor(0,0);
display.print("Time: ");
display.print(GPS.hour, DEC); display.print(':');
display.print(GPS.minute, DEC); display.print(':');
display.print(GPS.seconds, DEC); display.print('.');
display.println(GPS.milliseconds);
display.setCursor(0,0);
display.print("Time:                  ");  // bunch of spc to clear the line

But it does not work, the numbers are overwritten showing a mess!

I could not find a function in the library to clear a character or the whole line...

Any help?

You have to delete previous values first. Good way is save old values and print it using background colour just before printing new values.
If your TFT is fast enough You can clear display instead.
You can also print rectangle in badkground color - deleting old values.
In my opinion printing saved old values is best way - I 'm usin'g it.

I heard about "XOR way" but dont know it.
MAc

But it does not work, the numbers are overwritten showing a mess!

It would help if we could see more of your sketch. For example, I assume that the code you have shown is in loop(), but I don't see any delay.

Don

sp9mrn:
You have to delete previous values first. Good way is save old values and print it using background colour just before printing new values.
If your TFT is fast enough You can clear display instead.
You can also print rectangle in badkground color - deleting old values.
In my opinion printing saved old values is best way - I 'm usin'g it.

I heard about "XOR way" but dont know it.
MAc

XOR can only work if your display supports reading as well as writing the framebuffer memory - a lot don't.