M
meh
Hi All;
After creating a new tab if I delete the tab I cannot close my app from the
X in the upper right of the window. NE1 have a clue why.
Tried stepping through the delete seems to work fine but I can not close the
app??????
I am creating a new Tab this way.....
ElseIf e.Button Is tbNewVol Then
Dim tp As New TabPage()
Dim lbl As New Label()
Dim cboBox As New ComboBox()
Dim tv As New TreeView()
Dim tb As New ToolBar()
tp.Controls.AddRange(New System.Windows.Forms.Control() {tv, cboBox, lbl,
tb})
' Set control's properties here.
tb.Dock = DockStyle.Right
tb.Buttons.AddRange(New System.Windows.Forms.ToolBarButton()
{Me.btnClrCombo, Me.tb2Sep1, Me.tbScratch, Me.tb2Sep2, Me.tbNewVol,
Me.tbSep3, Me.tbExpandAll, Me.tbCollapseAll, Me.tbSep4, Me.tbMailTo})
tb.Appearance = ToolBarAppearance.Flat
tb.ButtonSize.Height.Equals(16)
tb.ButtonSize.Width.Equals(16)
lbl.BorderStyle = BorderStyle.Fixed3D
lbl.Dock = DockStyle.Top
cboBox.Dock = DockStyle.Top
tv.Dock = DockStyle.Fill
tv.ContextMenu = mnuTreeContext
Me.TabControl.TabPages.Add(tp)
Dim tabCount As Integer = TabControl.Controls.Count
TabControl.SelectedIndex = TabControl.TabPages.IndexOf(tp)
TabControl.SelectedTab.Text = ("New Volume " & ((TabControl.TabCount() +
1) - 2))
CurrTree = tv
tb = ToolBar2
CurrCombo = cboBox
CurrLabel = lbl
I am deleting the Tab this way....
Private Sub tabMenuDelete_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tabMenuDelete.Click
Dim Test As String
Test = TabControl.SelectedTab.Text()
TabControl.TabPages.Remove(TabControl.SelectedTab)
TabControl.Refresh()
End Sub
After creating a new tab if I delete the tab I cannot close my app from the
X in the upper right of the window. NE1 have a clue why.
Tried stepping through the delete seems to work fine but I can not close the
app??????
I am creating a new Tab this way.....
ElseIf e.Button Is tbNewVol Then
Dim tp As New TabPage()
Dim lbl As New Label()
Dim cboBox As New ComboBox()
Dim tv As New TreeView()
Dim tb As New ToolBar()
tp.Controls.AddRange(New System.Windows.Forms.Control() {tv, cboBox, lbl,
tb})
' Set control's properties here.
tb.Dock = DockStyle.Right
tb.Buttons.AddRange(New System.Windows.Forms.ToolBarButton()
{Me.btnClrCombo, Me.tb2Sep1, Me.tbScratch, Me.tb2Sep2, Me.tbNewVol,
Me.tbSep3, Me.tbExpandAll, Me.tbCollapseAll, Me.tbSep4, Me.tbMailTo})
tb.Appearance = ToolBarAppearance.Flat
tb.ButtonSize.Height.Equals(16)
tb.ButtonSize.Width.Equals(16)
lbl.BorderStyle = BorderStyle.Fixed3D
lbl.Dock = DockStyle.Top
cboBox.Dock = DockStyle.Top
tv.Dock = DockStyle.Fill
tv.ContextMenu = mnuTreeContext
Me.TabControl.TabPages.Add(tp)
Dim tabCount As Integer = TabControl.Controls.Count
TabControl.SelectedIndex = TabControl.TabPages.IndexOf(tp)
TabControl.SelectedTab.Text = ("New Volume " & ((TabControl.TabCount() +
1) - 2))
CurrTree = tv
tb = ToolBar2
CurrCombo = cboBox
CurrLabel = lbl
I am deleting the Tab this way....
Private Sub tabMenuDelete_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tabMenuDelete.Click
Dim Test As String
Test = TabControl.SelectedTab.Text()
TabControl.TabPages.Remove(TabControl.SelectedTab)
TabControl.Refresh()
End Sub