%ms - Multi-select Box

Purpose

To include a multi-selection box.

Syntax

winio@('%n.mms[options]', itemsnum_itemssel)
character*n items(num_items)    (input)
integer num_items               (input parameter)
integer sel(num_items)          (input/output)

Modifiers

Grave accent (`) - used to provide multiple selection using the CTRL and SHIFT keys and mouse dragging.

Caret (^) - call-back function is called when the user selects an item.

Question mark (?) - a help string is supplied.

Description

n and m are optional (m cannot be specified without n). n represents the width of the list-box in characters and m the depth.

The option [height=n] sets the pixel height of individual items to 'n' pixels. The default value is 16. An asterisk can be used and the value passed in the argument list. If you include a help string in square brackets then you must also include a (possibly empty) options list.

num_items is the number of items in the list. If m is less than num_items then a scroll bar is presented.

sel is an array whose elements are set to 1 if the item is selected otherwise to zero.

items is an array of text entries, one for each item. Blank entries at the end of the list are not displayed. This means that you can use blank entries to create a list that can be changed dynamically.

%ms will take a pivot %pv (Pivot).

Example

character*10 names(4)
integer sel(4)
winio@('%^`ms', names, 4L, sel, cb_func)

See also

%ls (List Box (or Combo Box)), %el (Editable Combo Box), %lv (List View), %pb (Parameter Box), %ps (Property Sheet Container)

 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited