CREATE FONT Example


Example:

 

*

 

 

.Define the FONT, STATTEXT, BUTTON and other variables

.

 

 

FONT1

FONT

 

STEXT1

STATTEXT

 

BUTTON1

BUTTON

 

RESULT

FORM

2

*

 

 

.Create the Objects

.

 

 

  

CREATE

FONT1,"Arial",SIZE=12,BOLD

  

CREATE

STEXT1=10:11:20:60:

  

  

"Arial Font - Size 12 - Bold",FONT1

  

CREATE

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

  

  

 FONT="'>MS Sans Serif'(8,BOLD)"

*

 

 

.Activate the Objects

.

 

 

  

ACTIVATE

STEXT1

  

ACTIVATE

BUTTON1,EXIT,RESULT

*

 

 

.Wait for an Event to Occur

.

 

 

  

LOOP

 

  

  EVENTWAIT

 

  

REPEAT

 

*

 

 

.Exit Selected

.

 

 

EXIT

 

 

  

STOP

 

 

This example creates a STATTEXT and a FONT object. The STATTEXT object is activated to display the effect of the FONT object. Upon clicking the EXIT BUTTON, the program terminates.

 

 



PL/B Language Reference CREATE FLOATMENU Example CREATE GROUPBOX Example