CREATE LINE Example


Example:

 

*

 

 

.Define the LINEs, COLORs, BUTTON and result variable

.

 

 

LINE

LINE

(3)

COLORS

COLOR

(3)

BUTTON

BUTTON

 

RESULT

INTEGER

1

*

 

 

.Create the Colors

.

 

 

  

CREATE

COLORS(1)=*YELLOW

  

CREATE

COLORS(2)=*RED

  

CREATE

COLORS(3)=*BLUE

*

 

 

.Create the Lines

.

 

 

  

CREATE

LINE(1)=4:40:2:2,BDRCOLOR=COLORS(1)

  

CREATE

LINE(2)=4:40:4:10,BDRCOLOR=COLORS(2)

  

CREATE

LINE(3)=40:20:10:20,BDRCOLOR=COLORS(3)

*

 

 

.Create the Button

.

 

 

  

CREATE

BUTTON=16:17:35:42,"Exit"

*

 

 

.Activate the Lines and Button

.

 

 

  

ACTIVATE

LINE

  

ACTIVATE

BUTTON,EXIT,RESULT

*

 

 

.Wait for an Event to Occur

.

 

 

  

LOOP

 

  

  EVENTWAIT

 

  

REPEAT

 

*

 

 

.Exit Button Selected

.

 

 

EXIT

 

 

  

STOP

 

 

This example creates three LINEs and a BUTTON on the screen. When the Quit BUTTON is clicked, the program is

terminated.

 

 



PL/B Language Reference CREATE LABELTEXT Example CREATE LISTVIEW Example