473,788 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deleting Tabs from Tab Control

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.Add Range(New System.Windows. Forms.Control() {tv, cboBox, lbl,
tb})

' Set control's properties here.

tb.Dock = DockStyle.Right

tb.Buttons.AddR ange(New System.Windows. Forms.ToolBarBu tton()
{Me.btnClrCombo , Me.tb2Sep1, Me.tbScratch, Me.tb2Sep2, Me.tbNewVol,
Me.tbSep3, Me.tbExpandAll, Me.tbCollapseAl l, Me.tbSep4, Me.tbMailTo})

tb.Appearance = ToolBarAppearan ce.Flat

tb.ButtonSize.H eight.Equals(16 )

tb.ButtonSize.W idth.Equals(16)

lbl.BorderStyle = BorderStyle.Fix ed3D

lbl.Dock = DockStyle.Top

cboBox.Dock = DockStyle.Top

tv.Dock = DockStyle.Fill

tv.ContextMenu = mnuTreeContext

Me.TabControl.T abPages.Add(tp)

Dim tabCount As Integer = TabControl.Cont rols.Count

TabControl.Sele ctedIndex = TabControl.TabP ages.IndexOf(tp )

TabControl.Sele ctedTab.Text = ("New Volume " & ((TabControl.Ta bCount() +
1) - 2))

CurrTree = tv

tb = ToolBar2

CurrCombo = cboBox

CurrLabel = lbl

I am deleting the Tab this way....
Private Sub tabMenuDelete_C lick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles tabMenuDelete.C lick

Dim Test As String

Test = TabControl.Sele ctedTab.Text()

TabControl.TabP ages.Remove(Tab Control.Selecte dTab)

TabControl.Refr esh()

End Sub



Nov 20 '05 #1
3 1573
Meh,

* "meh" <re************ ******@cox.net> scripsit:
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??????


Seems to be this "bug":

<http://www.jelovic.com/weblog/e41.htm>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
meh
thx Herfried;

Yes it is that bug......been trying to figure out the
OnControlRemove d()

Do you know of any samples I might look at....I still don't understand the
..Net help it seems to tell me what this event is but not how to use
it........

tia
meh

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:c1******** *****@ID-208219.news.uni-berlin.de...
Meh,

* "meh" <re************ ******@cox.net> scripsit:
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??????


Seems to be this "bug":

<http://www.jelovic.com/weblog/e41.htm>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3
meh
If any one is interested the work around (fix) was

The tab I built had controls on it Label, ComboBox, TreeView....

If I delete the controls first then I can delete the TabPage with no
detrimental effects on the app. i.e. It closes like a champ.

Thx to all

meh

"meh" <re************ ******@cox.net> wrote in message
news:ua******** *******@TK2MSFT NGP11.phx.gbl.. .
thx Herfried;

Yes it is that bug......been trying to figure out the
OnControlRemove d()

Do you know of any samples I might look at....I still don't understand the
.Net help it seems to tell me what this event is but not how to use
it........

tia
meh

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:c1******** *****@ID-208219.news.uni-berlin.de...
Meh,

* "meh" <re************ ******@cox.net> scripsit:
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??????


Seems to be this "bug":

<http://www.jelovic.com/weblog/e41.htm>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2000
by: Paiam Salavati | last post by:
I want to change the the color of the tabs and the color of TabControl itself in a TabControl. Therefore I wrote the following code in my customized TabControl-class: this.DrawMode = TabDrawMode.OwnerDrawFixed; protected override void OnDrawItem(DrawItemEventArgs e) {
1
2235
by: Mark C | last post by:
I have yet another problem with the infamous tab control in my Access 97 database. I have a form with a tab control with 4 tabs on each tab is a sub form bound to a form. When the main form loads the vertical scroll bar moves the main form down just low enough to were one can't see the tabs on the tab control. Once you scroll back to the top of the main form and click on one of the four tabs the sub form on that tab becomes visible but the...
6
1253
by: Mike | last post by:
I'm creating a "portal" type web app and i want to use a "tab" appearance for navigation. How can i create a "tab" look navigation system for my portal?
11
2295
by: Steve B. | last post by:
How can I keep the ComboBox textbox empty of datasource items when my local application starts AND keep them empty even after the user clicks different Tabs on the form. I welcome any questions. The problem isn’t clearing the items from the CB textbox, the problem is I can’t keep them empty when the user moves around the Tabs on the form. Each Tab has more CB’s and, by the way of course, I need to keep user CB selections on each...
0
1080
by: Ashutosh | last post by:
I have 3 tabs in the tab control of a dialog application. The user can resize the application. I want these 3 tabs (not the form but the place where user click to switch among tabs) to spread throughout the tab control i.e. I want total tabs to be 3 and total tabs in a row to be 3 also. I hope I explained my issue properly. Thanks.
135
7530
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about which is better. It has become what's known as “religious war” — a heated fight over trivia. In this essay, i like to explain what is the situation behind it, and which is proper.
3
2019
ADezii
by: ADezii | last post by:
One frequently asked question at TheScripts is how to set focus/make active a specific Tab on a Tab Control other than clicking on it. Before I provide the answer, I feel as though a little summary information would be most helpful. __1. An individual Tab on a Tab Control is actually a Page Object. For this discussion, we will use the terms Tab/Page interchangeably, however. __2. Each Page Object is a member of the Pages Collection which...
4
44140
ADezii
by: ADezii | last post by:
One frequently asked question at TheScripts is how to set focus/make active a specific Tab on a Tab Control other than clicking on it. Before I provide the answer, I feel as though a little summary information would be most helpful. __1. An individual Tab on a Tab Control is actually a Page Object. For this discussion, we will use the terms Tab/Page interchangeably, however. __2. Each Page Object is a member of the Pages Collection which...
7
3759
by: Phil Reynolds | last post by:
I'm using a tab control in Access 2000, and the user requested to have buttons in the form header, instead of the built-in tabs (so that when they scroll down, they can still switch tabs). Now, this works fine. However, when I'm in Design View, I can't access the tabs without changing the tab control's Style back to Tabs. But I want to be able to place controls in that space at the top where the tabs used to be. But if I need to turn the...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.