New Page 1

How To Do - Example Projects

Click on the title to open the example project
Click on the How to projects above to see the basic sample code to help you create your projects quickly and efficiently.
Each "How To" has a overall description as well as a basic line by line detail of code.
You can download the project or copy the menu file to clipboard
 
Basic Entities     Basic animation     Basic functions  
Add Image   Create button   Basic math operations
Draw colour boxes   Show page - multiple pages   Math functions
Draw colour lines   Flashing text message   Create random number
Draw colour vectors   Animation with pointers   Plus and Minus
Draw colour circles   Scroll text message   Show and format Time and Date
Draw colour ellipses   Move images (TouchX, TouchY)   Save Timestamp to text file  
Draw arcs (ellipses with angle)   Move images with buttons   Password Entry Lock  
Add multiple rows text     Move images (press button)     Menu Selection  
Use pointers   Create slider      
Text Hello World   Show and hide entities   Graphs
Create Dynamic Entities     Dial needle   Create X-Bar Graph
      PNG Transparency     Create Y-Bar Graph  
Interfaces and Hardware             Trace graph from array  
Create IO Counter           Draw sinusoid graph   
External Key             Draw graph - DNA style
Use A to D converters           Draw line graph  
Send and receive data - RS232          
Keyboard Control            
           
 

How to add multiple rows text

Add background image to library
Add font file to library

Create page style using background image
Create text style for single line text
Create text style for 2 rows of text no wrap
Create text style for 2 rows with text wrap on 19th character

Create variable for single line text
Create variable for multiple line text with \\0D for carriage returns
Create variable for multiple line text

Define a page named "pageName" with style "pageStyle"

Create text entity for single line text
Create text entity for single line text using variable
Create text entity for mult iline text
Create text entity for multi line text using variable
Create text entity for mulit line text with text wrapping
Create text entity for multi line text using variable with text wrapping

After loading show the page named "pageName"

LIB(background,"SDHC/bground.png");
LIB(asc_16b,"SDHC/asc_16b.fnt");

STYLE(pageStyle, Page) { image = background; }
STYLE(textStyleS, Text) { font=asc_16b; col=Black; currel=CL;}
STYLE(textStyleM, Text) { font=asc_16b; col=Black; currel=CL; MaxRows=2;}
STYLE(textStyleW, Text) { font=asc_16b; col=Black; currel=CL; wrap=cc; MaxRows=2; MaxLen=19;}

VAR(TxtVarS,"Text Variable Single Line", TXT128);
VAR(TxtVarM,"Text Variable Multiple Line\\0DExample", TXT128);
VAR(TxtVarW,"Text Variable Wraps on 19th Character", TXT128);

PAGE(pageName, pageStyle)
{
POSN(50, 51);
TEXT(Text1,"Single Line Text",textStyleS);
TEXT(Text2,TxtVarS,textStyleS);
TEXT(Text3,"Multiple Line Text\\0DExample",textStyleM,170, 116);
TEXT(Text4,TxtVarM,textStyleM,170, 156);
TEXT(Text5,"Multiple Line Text Example",textStyleW,290, 196);
TEXT(Text6,TxtVarW,textStyleW,290, 236);
}
SHOW(pageName);