Adds a new tab. The *widget* is the content of the tab. The *key* is the tab title.
(self, widget, key='')
| 2082 | |
| 2083 | |
| 2084 | def append(self, widget, key=''): |
| 2085 | """ Adds a new tab. |
| 2086 | The *widget* is the content of the tab. |
| 2087 | The *key* is the tab title. |
| 2088 | """ |
| 2089 | key = super(TabBox, self).append(widget, key) |
| 2090 | self.tab_keys_ordered_list.append(key) |
| 2091 | self.container_tab_titles.append(ListItem(key), key) |
| 2092 | self.resize_tab_titles() |
| 2093 | #if first tab, select |
| 2094 | if self.selected_widget_key is None: |
| 2095 | self.on_tab_selection(None, key) |
| 2096 | else: |
| 2097 | self.on_tab_selection(None, self.selected_widget_key) |
| 2098 | |
| 2099 | def remove_child(self, widget): |
| 2100 | key = None |
no test coverage detected