It is currently Mon May 20, 2013 2:39 am

All times are UTC - 7 hours [ DST ]




 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: Text Insertion Issue/Query
PostPosted: Wed Oct 26, 2011 3:26 pm 
LCD?

Joined: Wed Oct 26, 2011 3:20 pm
Posts: 1
Hello,

I have a question regarding the text insertion on the GTT. My goal is to have 3 text boxes on a screen and update these values when RTI occurs on my uC. My issue is that I need to be able to clear the text in each box and rewrite the new value. I'm pretty sure this is possible, but I guess I'm not sure on how it is implemented with the command strings. Currently it seems to just write to a point where the text area (inside the text region) is out of bounds.

A good example of what I would like to do is in the GTT video posted in the forums. The text is inserted upon keypress and cleared when "C" is pressed. All of which is contained in the slim text area defined.

If anyone can shed some light on this situation I would greatly appreciate it.

Thanks,
Stephen


Offline
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2011 9:15 am 
Matrix Orbital
Matrix Orbital

Joined: Fri Aug 17, 2007 10:58 am
Posts: 752
Location: Matrix Orbital
Hello Stephen,

Using the existing command set, filling a text area will take a little memory on your host side.

In your application, I could see a string or array variable for each text box. When a key is pressed you could update the string by either appending a character or clearing it. After each update you would draw a Filled Rectangle of the background colour to clear the area and write the current string to the newly cleared location.

Additionally, you could use the Get String Extents command before writing your updated string to ensure it doesn't exceed the text box boundaries.

All the best with your GTT development, if you find anything else that isn't clearly laid out in the manual, please don't hesitate to post.

Thanks,
~Troy



_________________
Troy Clark
Technical Support
Matrix Orbital
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron