CREATE POPUPMENU Example


Example:

 

*

 

 

.Define the POPUPMENU and other variables

.

 

 

POPUP1

POPUPMENU

 

POPUP1D

INIT

";None;Display;List;Print"

PUVAL

FORM

1

*

 

 

.Create the Object

.

 

 

  

CREATE

POPUP1=2:8:30:50,"Options",POPUP1D

*

 

 

.Activate the Object

.

 

 

  

ACTIVATE

POPUP1,EXIT,PUVAL

*

 

 

.Wait for an Event to Occur

.

 

 

  

LOOP

 

  

  EVENTWAIT

 

  

REPEAT

 

*

 

 

.Item Selected - Display the Value of the POPUPMENU

.

 

 

EXIT

 

 

  

DISPLAY

*P10:14,"Value of the ":

  

  

"POPUPMENU upon exit: ":

  

  

PUVAL,*W3;

  

STOP

 

 

This example creates a POPUPMENU object with four items. The user may select any item. Upon selecting an item, the selected item number is displayed and the program terminates.

 

 



PL/B Language Reference CREATE PICT Examples CREATE PROGRESS Example