2022 April Release

Control COOATTREDIT@1.1:CTRLPick Permanent link for this heading

This control is used to display a list of enumeration entries or a list of objects. The elements to choose from can be specified by a hint. The name of the hint has to be the short reference of the corresponding property followed by _hint (e.g. ctrlsampleobjects_hint). It can be defined in the get expression of a field (see example below) or within the virtual application.
If no hint is specified then
  • for enumeration entries all the entries specified by the type that are not disabled are used (see typeenumvalues and typeenumdisabled)
  • for a list of objects the values provided by the action LocalObjectsGet() are used. The list provided by that action can be influenced by providing a filter expression for the property (see attrfilterexpr)
The order of values is not evaluated when comparing new-values and old-values.

Example:
layout {
  row {
    // the references of the enumeration entries are shown in one column
    CTRLPick("ShowReference=true Columns=1") ctrlsampleenum {
      colspan = 4;
      labelposition = left;
    }
  }
}

dataset {
  field ctrlsampleobjects {
    get = expression {
      // <reference>_hint is used to define the displayed entries
      this.ctrlsampleobjects_hint = [#SymbolAndroid, #SymboliOS, #SymbolLinux,
                                     #SymbolWindows, #SymbolMacOS];
      return null;
    }
  }
}
layout {
  row {
    // only thumbnails should be displayed
    // 110px spacing between the columns
    CTRLPick("ShowThumbnail='COODESK_1_1_symbolimages(3)content(0)
               contcontent(0)' Width=110px") ctrlsampleobjects {
      rowspan = 2;
      colspan = 4;
      labelposition = left;
    }
  }
}

COOATTREDIT@1.1:CTRLPick(
  string Change,
  SortMode SortMode,
  boolean ShowReference,
  boolean ShowIcon,
  string ShowThumbnail,
  boolean ShowSelectAll,
  string InputType,
  string Width,
  integer Columns,
  boolean Enhanced,
  boolean SingleSelect,
  boolean InvertedSelect,
  boolean ShowAllEntries,
  boolean ShowObjectInfo,
  boolean ObjectContextMenu)

Name

Description

Change

Defines the JavaScript function, which should be called when the value of the control has been changed.

SortMode

Defines the sort mode for the enumeration entries or object lists. For enumeration entries this argument allows to override the default sort mode specified by the enumeration type (typelistsorting).
The sort mode is used in combination with the ShowReference argument to sort either by names or by references.
SortMode uses the same values as defined in SortMode:
  • 0 (SORTMODE_NONE)
    no sorting (default)
  • 1 (SORTMODE_UP)
    sort ascending
  • 2 (SORTMODE_DOWN)
    sort descending

ShowReference

Defines whether references of enumeration entries or objects are displayed.

ShowIcon

Defines whether a small symbol is displayed for each object list entry.

ShowThumbnail

Defines a property path to an image that should be displayed for each object list entry.

ShowSelectAll

Defines whether a checkbox is displayed that allows to select or deselect all entries. Makes only sense when checkboxes are used.

InputType

Width

Defines the width of every entry in the list. This value can be a fix value, e.g. 40px or "*" which means the list of values is dynamically resized depending on the values.

Columns

Defines the number of the columns, in which the enumeration or object list entries are shown.

Enhanced

Defines whether a thumbnail and a name is displayed for each object list entry.

SingleSelect

Defines whether several checkboxes or only one checkbox can be selected at maximum.

InvertedSelect

If set to true, the not checked entries are stored in the underlying property. This can be useful to implement an opt-out list.

ShowAllEntries

If set to true, all entries are displayed when control is in readonly mode.

ShowObjectInfo

If set to false, object info functionality is disabled for each object entry.

ObjectContextMenu

If set to false, context menu functionality is disabled for each object entry.

Additional Information