[TFT 2.8] Disable wrap would rather Scroll?

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

[TFT 2.8] Disable wrap would rather Scroll?

Postby civicbynature » Sat Feb 23, 2013 3:13 am

Hello,
I'm currently working on an awesome project I hope to show off very soon .
Using the raspberry pi, arduino and adafruit's 2.8 TFT breakout.

I'm sending strings of text from the Rpi to arduino via uart to be displayed on the Lcd. But what I really need or I guess need to know is How or is it possible to disable the wrap feature for text and instead some how get the text to scroll left or right?
I know I can just make the text smaller to fit more on a line but that is so aesthetically unpleasing. :roll:

The goal is to display titles of songs and/or radio streams within a certain area and not wrap to the next line, as it would then interfere with other Areas, buttons etc...

Help/idea's..plz

Civicbynature
User avatar
civicbynature
 
Posts: 35
Joined: Wed Feb 09, 2011 10:58 pm

Re: [TFT 2.8] Disable wrap would rather Scroll?

Postby adafruit_support_rick » Sat Feb 23, 2013 10:21 am

To disable text wrapping, use setTextWrap(false).

To make the line scroll, you write it over and over again, each time advancing the "start" of the line. Here's a VERY simplistic illustration:

Code: Select all
tft.print("Scrolling…  ");
tft.print("crolling…  S");
tft.print("rolling…  Sc");


You would actually want to do it by moving pointers around in a single character buffer (left as an exercise for the reader :wink: ).
User avatar
adafruit_support_rick
 
Posts: 2882
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY


Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [100]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]