Topic: APLX Help : System Classes : List of Classes : Check
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

Check


Description

The Check class implements the check boxes, for selecting several independent on/off options. You typically set the caption property which indicates the caption associated with the control, and you might set the enabled property to 1 or 0 depending on whether a particular option is valid. The value property (1 or 0) represents whether the check box is selected.

For Check boxes, it is not always necessary to have any callbacks defined, since when the dialog ends or a Button is pressed you can determine the state of the Check objects using the value property. In other cases, use of an onClick callback to detect changes in the state of these controls may be preferable, and it is necessary if other items in a dialog need to depend on the state of the Check box.

To provide help text when the user moves the mouse pointer over the Check box and pauses, you can use the tooltip property.

Example

     ∇DEMO_Check;DEMO
[1]   ⍝ Sample function demonstrating use of the Check object
[2]   DEMO←'⎕' ⎕NEW 'Dialog' ⋄ DEMO.scale←1
[3]   DEMO.title←'Check Example'
[4]   ⍝
[5]   DEMO.CHECK1.New 'Check'
[6]   DEMO.CHECK1.where←2 3 1 30
[7]   DEMO.CHECK1.caption←'I run APLX on MacOS'
[8]   ⍝
[9]   DEMO.CHECK2.New 'Check'
[10]  DEMO.CHECK2.where←3.5 3 1 30
[11]  DEMO.CHECK2.caption←'I use a Postscript printer'
[12]  ⍝
[13]  DEMO.CHECK3.New 'Check'
[14]  DEMO.CHECK3.where←5 3 1 30
[15]  DEMO.CHECK3.caption←'I upgraded from APL.68000'
[16]  DEMO.CHECK3.value←1
[17]  ⍝
[18]  DEMO.CHECK4.New 'Check'
[19]  DEMO.CHECK4.where←6.5 3 1 30
[20]  DEMO.CHECK4.caption←'I prefer Visual Basic'
[21]  DEMO.CHECK4.enabled←0
[22]  ⍝
[23]  ⍝ Wait for the user to close the window
[24]  0 0⍴⎕WE DEMO
     ∇

Properties

align anchors aquaadjust autodraw caption children class color data doublebuffered dragsource droptarget enabled events extent font handle maxsize methods minsize name opened order pointer properties scale self size sourceformats tabstop targetformats tie tooltip units value visible where winptr

Methods

Click Clienttoscreen Close Create Delete Draw Focus Hide New Open Paint Resize Screentoclient Send Set Show Trigger

Callbacks

onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onUnFocus


Topic: APLX Help : System Classes : List of Classes : Check
[ Previous | Next | Contents | Index | APL Home ]