+
+// Remove the tab without deleting the window
+bool wxTabView::RemoveTab(int id)
+{
+ wxNode *layerNode = m_layers.First();
+ while (layerNode)
+ {
+ wxTabLayer *layer = (wxTabLayer *)layerNode->Data();
+ wxNode *tabNode = layer->First();
+ while (tabNode)
+ {
+ wxTabControl *tab = (wxTabControl *)tabNode->Data();
+ if (tab->GetId() == id)
+ {
+ if (id == m_tabSelection)
+ m_tabSelection = -1;
+ delete tab;
+ delete tabNode;
+ m_noTabs --;
+
+ // The layout has changed
+ Layout();
+ return TRUE;
+ }
+ tabNode = tabNode->Next();
+ }
+ layerNode = layerNode->Next();
+ }
+ return FALSE;
+}
+
+bool wxTabView::SetTabText(int id, const wxString& label)
+{
+ wxTabControl* control = FindTabControlForId(id);
+ if (!control)
+ return FALSE;
+ control->SetLabel(label);
+ return TRUE;
+}
+
+wxString wxTabView::GetTabText(int id) const
+{
+ wxTabControl* control = FindTabControlForId(id);
+ if (!control)
+ return wxEmptyString;
+ else
+ return control->GetLabel();
+}