def remove_item_at(self, i): GTabView.remove_item_at(self, i) _tab_ctrl = self._win gui.SendMessage(_tab_ctrl.GetSafeHwnd(), cc.TCM_DELETEITEM, i, 0)
def remove_item(self, v): GTabView.remove_item(self, v) _gtk_notebook = self._gtk_inner_widget page_num = _gtk_notebook.page_num(v._gtk_inner_widget) if page_num >= 0: _gtk_notebook.remove_page(page_num)
def insert_item_at(self, v, i, title = None): GTabView.insert_item_at(self, v, i, title) _ns_tabview = self._ns_view _ns_tabview_item = self._create_ns_tabview_item(v, title) _ns_tabview.insertTabViewItem_atIndex_(_ns_tabview_item, i)
def remove_item(self, v): i = self.items.index(v) _tab_ctrl = self._win GTabView.remove_item(self, v) gui.SendMessage(_tab_ctrl.GetSafeHwnd(), cc.TCM_DELETEITEM, i, 0)
def insert_item_at(self, v, i, title=None): GTabView.insert_item_at(self, v, i, title) _gtk_notebook = self._gtk_inner_widget _tab_label = None if title: _tab_label = gtk.Label(title) _gtk_notebook.insert_page(v._gtk_inner_widget, tab_label=_tab_label, position=i)
def add_item(self, v, title = None): _ns_tabview = self._ns_view _ns_tabview_item = self._create_ns_tabview_item(v, title) GTabView.add_item(self, v, title) _ns_tabview.addTabViewItem_(_ns_tabview_item) child_bounds = self._get_content_bounds() v.bounds = child_bounds
def add_item(self, v, title=None): GTabView.add_item(self, v, title) _gtk_notebook = self._gtk_inner_widget _tab_label = None if title: _tab_label = gtk.Label(title) _tab_label.show() index = _gtk_notebook.append_page(v._gtk_inner_widget, tab_label=_tab_label)
def remove_item(self, v): GTabView.remove_item(self, v) _ns_tabview = self._ns_view item = v._ns_tabview_item idx = _ns_tabview.indexOfTabViewItem_(item) count = _ns_tabview.numberOfTabViewItems() if idx >= 0 and idx < count: _ns_tabview.removeTabViewItem_(item) self.tab_changed(self.selected_index)
def remove_item_at(self, i): GTabView.remove_item_at(self, i) _ns_tabview = self._ns_view count = _ns_tabview.numberOfTabViewItems() if i >= count or i < 0: return _ns_tabview.removeTabViewItem_(_ns_tabview.tabViewItems()[i]) self.tab_changed(self.selected_index)
def __init__(self, font = system_font, **kwds): _ns_tabview = self._create_ns_tabview(font, padding = (10, 2)) GTabView.__init__(self, _ns_view = _ns_tabview, **kwds)
def container_resized(self, delta): GTabView.container_resized(self, delta)
def add_item(self, v, title = None): i = len(self.items) self._insert_item_at(v, i, title) GTabView.add_item(self, v, title)
def __init__(self, **kwds): win = self._win_create_tabctrl() GTabView.__init__(self, _win = win, **kwds)
def _resized(self, delta): self._resize_children() GTabView._resized(self, delta)
def remove_item_at(self, i): GTabView.remove_item_at(self, i) _gtk_notebook = self._gtk_inner_widget _gtk_notebook.remove_page(i)
def insert_item_at(self, v, i, title = None): self._insert_item_at(v, i, title) GTabView.insert_item_at(self, v, i, title)
def __init__(self, font=system_font, **kwds): gtk_notebook = gtk.Notebook() gtk_notebook.show_all() self._gtk_connect(gtk_notebook, 'switch-page', self._gtk_notebook_switch_page_signal) GTabView.__init__(self, _gtk_outer=gtk_notebook, **kwds)