CheckBoxes are used for selections. They can either be on (selected) or off (not selected). Use CheckBoxes for independent or nonexclusive choices; use OptionButtons for exclusive choices.
000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. democheck.
000030 ENVIRONMENT DIVISION.
000040 DATA DIVISION.
WORKING-STORAGE SECTION.
01 valore pic 9 external.
01 acheck usage pointer external.
01 abox usage pointer external.
000240 PROCEDURE DIVISION.
000260
000270 invoke SUPER "addform" returning SELF.
invoke SELF "size" using 300 300
invoke self "addspaceshoriz"
move "MIDDLERIGHT" TO "position" of self
move "GuiCOBOL TEST FOR GNUCOBOL " to "caption" of self
move "orangered" to "color" of self.
move "darkgreen" to "textcolor" of self.
move "green" to "bordercolor" of self.
move "100%" to "fontsize" of self.
invoke self "addbox" returning abox.
move agar-true to "homogenous" of abox.
invoke abox "addcheckto" using "Change the value here" "clickprocedure" returning acheck
invoke self "show"
invoke SELF "run"
000280
001080 stop run.
001090
001100 end program democheck.
identification division.
001130 program-id. clickprocedure.
001140 data division.
001150 working-storage section.
001160
001260 procedure division.
001270
move "value" of acheck to valore
if valore = agar-ON
move " the value is ON" To "info" of self
ELSE
move " the value is OFF" To "info" of self.
001350 exit program.
001360 end program clickprocedure.
001110