MCPcopy Index your code
hub / github.com/rawpython/remi / select_by_value

Method select_by_value

remi/gui.py:2797–2814  ·  view source on GitHub ↗

Selects a DropDownItem by means of the contained text- Args: value (str): Textual content of the DropDownItem that have to be selected.

(self, value)

Source from the content-addressed store, hash-verified

2795 self.select_by_value(value)
2796
2797 def select_by_value(self, value):
2798 """Selects a DropDownItem by means of the contained text-
2799
2800 Args:
2801 value (str): Textual content of the DropDownItem that have to be selected.
2802 """
2803 self._selected_key = None
2804 self._selected_item = None
2805 for k in self.children:
2806 item = self.children[k]
2807 if item.value == value:
2808 item.attributes['selected'] = 'selected'
2809 self._selected_key = k
2810 self._selected_item = item
2811 log.debug('dropdown selected item with value %s' % value)
2812 else:
2813 if 'selected' in item.attributes:
2814 del item.attributes['selected']
2815
2816 def get_item(self):
2817 """

Callers 3

appendMethod · 0.95
set_valueMethod · 0.95
onchangeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected