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 create button

Add background image to library
Add Button image to the library

Create page style using background image
Create a text style
Create a image style
Create a key style type equal changed
Create a variable for counter

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

Create image entity using the prbtn image from library
Hide the image entity
Create key which shows prbtn image on key press and on release adds one to varCounter variable and hides image entity
Create text entity to display the varCounter variable

After loading show the page named "pageName"

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

STYLE(pageStyle, Page) { image = background; }
STYLE(textStyle, Text) { font=Ascii32; col=Black; }
STYLE(imageStyle, Image) { currel=TL; }
STYLE(keyStyle, Key) { currel=TL; action=C;}
VAR(varCounter,0,U16);

PAGE(pageName, pageStyle)
{
IMG(imageButton,prbtn,imageStyle,50,100);
HIDE(imageButton);
KEY(keyButton,[SHOW(imageButton);;], [CALC(varCounter,varCounter,1,"+");TEXT(textCounter,varCounter); HIDE(imageButton);;],200,100,keyStyle,50,100);
TEXT(textCounter,varCounter,textStyle,366,160);
}
SHOW(pageName);