CREATE SPLITTER Example


Example:

 

WIN

WINDOW

 

DL

DATALIST

 

SPL

SPLITTER

 

BUT

BUTTON

 

RESULT

INTEGER

1

*

 

 

.Create the window

.

 

 

  

CREATE

WIN=119:354:337:828,BGCOLOR=0x8000000F

*

 

 

.Create the datalist

.

 

 

  

CREATE

WIN;DL=0:188:0:491:

  

  

ZORDER=29,DOCK=5,Anchor=7

*

 

 

.Create the splitter

.

 

 

  

CREATE

WIN;SPL=188:198:0:491:

  

  

ZORDER=30,DOCK=5

*

 

 

.Create the Exit button

.

 

 

  

CREATE

WIN;BUT=208:232:186:288,"E&xit":

  

  

DEFAULT=1,Anchor=2

*

 

 

.Activate all the objects

.

 

 

  

ACTIVATE

DL

  

ACTIVATE

SPL

  

ACTIVATE

BUT,DONE,RESULT

  

ACTIVATE

WIN

*

 

 

.Wait for an event to occur

.

 

 

  

LOOP

 

  

EVENTWAIT

 

  

REPEAT

 

*

 

 

.Terminate

.

 

 

DONE

 

 

  

STOP

 

 

This example creates a WINDOW containing a DATALIST, a SPLITTER and a BUTTON. The DATALIST is docked to the SPLITTER. This allows resizing of the DATALIST by grabbing the SPLITTER and moving up or down. When the BUTTON is clicked the program terminates.

 



PL/B Language Reference CREATE SHAPE Example CREATE STATTEXT Example