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 show and hide entities

Add background image to library
Add Image to library removing red pixels
Add font file to library

Create page style using background image
Create text style
Create draw style
Create image style
Create variables for text, draw and image status

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

Create text entity
Create draw entity
Create Image entity
Create key that runs TEXTSH
Create key that runs BOXSH
Create key that runs IMGSH

Create TEXTSH function check status of TStat then change Status and Show/Hide Text entity depending on status
Create BOXSH function check status of BStat then change Status and Show/Hide Draw entity depending on status
Create IMGSH function check status of IStat then change Status and Show/Hide Image entity depending on status

After loading show the page named "pageName"

LIB(background,"SDHC/bground.png");
LIB(Image,"SDHC/MoveImg.bmp?back=\\ff0000");
LIB(asc_16,"SDHC/asc_16b.fnt");

STYLE(pageStyle,Page) {image=background;}
STYLE(textStyle,Text) {font=asc_16;col=black;}
STYLE(drawStyle,Draw) {type=B;col=red;back=darkorange;width=3;}
STYLE(imgStyle,Image) {curRel=CC;}
VAR(TStat,0,U8);VAR(BStat,0,U8);VAR(IStat,0,U8);

PAGE(pageName, pageStyle)
{
TEXT(Text1,"Text Entity",textStyle,120,136);
DRAW(Box1,50,50,drawStyle,240,136);
IMG(Image1,Image,imgStyle,360,136);
KEY(TK,TEXTSH,100,40,TOUCHR,120,220);
KEY(BK,BOXSH,100,40,TOUCHR,240,220);
KEY(IK,IMGSH,100,40,TOUCHR,360,220);
}
FUNC(TEXTSH){IF(TStat=0?[LOAD(TStat,1); HIDE(Text1);;]:[LOAD(TStat,0);SHOW(Text1);;]);}
FUNC(BOXSH){IF(BStat=0?[LOAD(BStat,1); HIDE(Box1);;]:[LOAD(BStat,0);SHOW(Box1);;]);}
FUNC(IMGSH){IF(IStat=0?[LOAD(IStat,1); HIDE(Image1);;]:[LOAD(IStat,0);SHOW(Image1);;]);}
SHOW(pageName);