Class: CWM::MultiSelectionBox

Inherits:
AbstractWidget show all
Includes:
ItemsSelection
Defined in:
library/cwm/src/lib/cwm/common_widgets.rb

Overview

A multi-selection box to select more values. The AbstractWidget#label method is mandatory.

See Also:

  • for child example

Instance Attribute Summary

Attributes inherited from AbstractWidget

#handle_all_events, #widget_id

Instance Method Summary collapse

Methods included from ItemsSelection

#change_items, #cwm_definition, #items

Methods inherited from AbstractWidget

#cleanup, #cwm_definition, #disable, #enable, #enabled?, #handle, #help, #init, #label, #opt, #store, #validate, widget_type=

Instance Method Details

#valueArray<String>

Return IDs of selected items

Returns:

  • (Array<String>)

    return IDs of selected items



221
222
223
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 221

def value
  Yast::UI.QueryWidget(Id(widget_id), :SelectedItems)
end

#value=(val) ⇒ Object

Parameters:

  • val (Array<String>)

    IDs of newly selected items



226
227
228
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 226

def value=(val)
  Yast::UI.ChangeWidget(Id(widget_id), :SelectedItems, val)
end