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

Method select_by_value

remi/gui.py:2693–2707  ·  view source on GitHub ↗

Selects an item by the text content of the child. Args: value (str): Text content of the item that have to be selected.

(self, value)

Source from the content-addressed store, hash-verified

2691 self.select_by_value(value)
2692
2693 def select_by_value(self, value):
2694 """Selects an item by the text content of the child.
2695
2696 Args:
2697 value (str): Text content of the item that have to be selected.
2698 """
2699 self._selected_key = None
2700 self._selected_item = None
2701 for k in self.children:
2702 item = self.children[k]
2703 item.attributes['selected'] = False
2704 if value == item.get_value():
2705 self._selected_key = k
2706 self._selected_item = item
2707 self._selected_item.attributes['selected'] = True
2708
2709
2710class ListItem(Widget, _MixinTextualWidget):

Callers 6

set_valueMethod · 0.95
__init__Method · 0.45
new_from_listMethod · 0.45
mainMethod · 0.45
dialog_confirmMethod · 0.45
_voices_callbackMethod · 0.45

Calls 1

get_valueMethod · 0.45

Tested by

no test coverage detected