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



The List class implements list boxes, allowing the user to make a selection from a list.

The style property defines the type of list box, as the sum of the following flags:

  1 = Allow multi select
  2 = Allow display of a non-integral number of lines
 16 = Show the vertical scroll bar
 64 = Show the horizontal scroll bar (Mac only)
128 = Hide scroll bars when they are not needed (Mac only)

The list property determines the items in the list box. You can set it either as a character matrix or as a character vector with embedded carriage returns. (If you read it back, it will be returned as a character matrix).

The value property is an integer scalar or vector containing the index into the list of the selected item, in index origin 1. It is an empty vector if there is no selection. If the style allows multi-select, it may be a vector of more than one element.

The firstvisible property allows you to read or set the first visible item in the list (i.e. where the list is scrolled to).

If you need to detect when the user changes the selection, add an onChange callback.


[1]   ⍝ Sample function demonstrating use of the List object
[2]   DEMO←'⎕' ⎕NEW 'Dialog' ⋄ DEMO.scale←1
[3]   DEMO.title←'List Example'
[4]   DEMO.myList.New 'List'
[5]   DEMO.myList.where←2 1
[6]   DEMO.myList.list←⎕M
[7]   DEMO.myList.value←3
[8]   ⍝
[9]   ⍝ Wait for the user to close the window
[10]  0 0⍴⎕WE DEMO


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


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


onChange 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 : List
[ Previous | Next | Contents | Index | APL Home ]