List item widget for the ListView. ListItems are characterized by a textual content. They can be selected from the ListView. Do NOT manage directly its selection by registering set_on_click_listener, use instead the events of the ListView.
| 2708 | |
| 2709 | |
| 2710 | class ListItem(Widget, _MixinTextualWidget): |
| 2711 | """List item widget for the ListView. |
| 2712 | |
| 2713 | ListItems are characterized by a textual content. They can be selected from |
| 2714 | the ListView. Do NOT manage directly its selection by registering set_on_click_listener, use instead the events of |
| 2715 | the ListView. |
| 2716 | """ |
| 2717 | |
| 2718 | def __init__(self, text='', *args, **kwargs): |
| 2719 | """ |
| 2720 | Args: |
| 2721 | text (str, unicode): The textual content of the ListItem. |
| 2722 | kwargs: See Widget.__init__() |
| 2723 | """ |
| 2724 | super(ListItem, self).__init__(*args, **kwargs) |
| 2725 | self.type = 'li' |
| 2726 | self.set_text(text) |
| 2727 | |
| 2728 | def get_value(self): |
| 2729 | """ |
| 2730 | Returns: |
| 2731 | str: The text content of the ListItem |
| 2732 | """ |
| 2733 | return self.get_text() |
| 2734 | |
| 2735 | |
| 2736 | class DropDown(Container): |
no outgoing calls
no test coverage detected