cObject
---cWebObject
------cWebBaseUIObject
---------cWebBaseDEOServer
------------cWebBaseControl
---------------cWebList
------------------cWebMultiSelectList
cWebMultiSelect enhances the cWebList class with the ability to select entries from that list using either the mouse or keyboard.
It has many options and modes for enhancing the way it works in the way that is desired. Any instance of a cWebList can be made into a cWebMultiSelect by just changing the class.
Fundamentally, cWebMultiSelect works like Windows Explorer when selecting items. Without additional properties set:
- a mouse click on a row will select it
- Ctrl+click will select multiple rows
- Shift+click will select a range of rows.
But it can also use a checkbox column to select multiple items.
Disabling the pbSelectionByRow property is recommended with a cWebColumnSelectionIndicator column, as it will disable any mouse selection on the rows themselves.
An example of the WebMultiSelect from WebOrder is:
Object oPromptList is a cWebMultiSelectList Set pbFillHeight to True Set piColumnSpan to 12 // Use a cWebColumnSelectionIndicator so disable Windows Explorer like selection behavior. Set pbDisableSelectionByRow to True Set pbDisableKeyboardSelection to True // Adds a checkbox column to the WebList for selecting entries. Object oMultiSelect is a cWebColumnSelectionIndicator Set piWidth to 86 Set pbSelectAllCheckbox to True End_Object Object oItem_ID is a cWebColumn Entry_Item Inventory.Item_ID Set psCaption to "Item Id" Set piWidth to 151 End_Object End_Object
The Selection can be retrieved using an array of serialized String-RowIds like so:
String[] aRowIds Get ListSelection of oPromtList to aRowIds
These RowIds are equivalent to the sRowId member in the tWebRow struct.
Setting the selection accordingly would be:
Set ListSelection of oPromtList to aRowIds
cWebContextMenu support is provided through the C_WebUIContextListSelection Context, then the psContextValue
property will be filled with a comma separated list of Serialized RowIds.
This control allows parts of itself to be picked up and dragged to other places in your interface. To do this, register it as a drag source in a cWebDragDropHelper.
Supported drag actions for this control are:
C_WebDragListSelection: returns a tWebMultiSelectListDropData struct in the dragdata:
Struct tWebMultiSelectListDropData tWebRow data End_Struct
This class is compatible with drag-drop support to the cWebList class.