The selection behavior.

Usage

Set_Property(OLECtrlEntID, "OLE.SelectBehavior", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<1>Group Select BehaviorOptionThe behavior for selecting groupsNone
<2>Item Select BehaviorOptionThe bheavior for selecting items within groupsNone

Remarks

The SelectBehavior lets you define how and if items are selected. There are two fields to this property, and each field accepts one of the following options:

ValueAbbr.Description
NoneNNo selections allowed
SingleSOnly one selection at a time is allowed
MultiMAny selection is allowed

If either field is set to "None", then the user can't select anything, though click events will still fire. This is the default setting since the Shortcut Bar is used primarily as links to other tasks. However, you may override this property to allow items to appear selected, thus using the Shortcut Bar as a selection control.

The first field defines Group select behavior. A value of "Single" states that only one group may contain selections at a time. In this state, when a user selects an item in one group, all other groups' selections are removed. To allow selections to occur in any group at any time, set the first field to "Multi".

The second field defines Item select behavior. Like groups, a value of "Single" allows the user to only select one item in its group at a time. In this state, when a user selects an item in a group, all other items in that group are deselected. A value of "Multi" allows the user to select any number of items in a group.

Selection will only be visible if you have the HotTrackStyle property set to "Image" or "Item". If you use alternate hot track styles, the selections will still exist but be invisible to the user.

The images below show the results of each possible value:

 

NoneSingle Group, Single Item

Single Group, Multi Item

Multi Group, Single Item

Mutli Group, Multi Item

Example

// Allow one selection in the whole control at a time 
Set_Property(@Window:".OLE_SHORTCUT", "OLE.SelectBehavior", "Single":@FM:"Single") 

// Allow one selection per group 
Set_Property(@Window:".OLE_SHORTCUT", "OLE.SelectBehavior", "Multi":@FM:"Single") 

// Allow multiple selections in only one group 
Set_Property(@Window:".OLE_SHORTCUT", "OLE.SelectBehavior", "Single":@FM:"Multi") 

// Allow multiple selections throughout the whole control 
Set_Property(@Window:".OLE_SHORTCUT", "OLE.SelectBehavior", "Multi":@FM:"Multi") 

// Allow no selections 
Set_Property(@Window:".OLE_SHORTCUT", "OLE.SelectBehavior", "None")

See Also

SelectionGroupSelection

  • No labels