SETITEM Examples


Example 1:

 

BUTTON2

BUTTON

 

  

CREATE

BUTTON2=20:22:40:47,"Quit"

  

SETITEM

BUTTON2,0,"Stop"

 

This instruction changes the name on BUTTON2 from "Quit" to "Stop.

 

Example 2:

 

RADIOX

RADIO

 

ON

FORM

"2"

  

...

 

  

SETITEM

RADIOX,0,ON

 

This instruction changes the visual look of the RADIO object to the ON or ACTIVE state. The RADIO object should already be active.

 

Example 3:

 

GROUP2

RADIOGRP

 

  

...

 

  

SETITEM

GROUP2,3,"Print"

 

This instruction changes the text beside the third radio button of a radio button group to 'Print'.

 

Example 4:

 

GROUP2

RADIOGRP

 

ON

FORM

"1"

  

...

 

  

SETITEM

GROUP2,3,ON

 

This instruction changes the visual look of the third radio button of a radio button group to the ON or ACTIVE state. Since only one radio button of a radio button group may be ON at any given time, if another radio button was on, it is turned off.

 

Example 5:

 

DIALOG2

DIALOG

 

DLDATA

INIT

"TYPE=MODELESS:

  

  

RADIOGRP=3:6:3:15:'One;Two;Three',":

  

...

 

  

...

 

  

SETITEM

DIALOG2,1,1,"Uno"

  

SETITEM

DIALOG2,1,2,"Dos"

  

SETITEM

DIALOG2,1,3,"Tres"

 

These instructions change the text for three radio buttons of a radio button group in a dialog box.

 

 



PL/B Language Reference SETFOCUS Example SETLPTR Examples