Vulpes as far it concerns tabs name update: the reason that I am thinking such a thing is because I want to assign in the same tab string a new tabpage without closing the initial one. For a single user this will be as from the initial tabpage it goes to a new tabpage by using the same tab and not opening a new one. Something like the categories of running applications in windows( not the same thought). That's why I mentioned to update tabs name.
Do you think is it possible?
P.S. I opened a new thread cause the initial one prints an error. ( http://www.c-sharpcorner.com/Forums/Thread/118328/add-childs-form-closing-event.aspx )
Loading

VulpesRank #55 · 29.2K reputationPosted May 22, 2011, 9:51 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 17, 2011, 1:51 AM EDT
What you will need to be careful with is the TabPages collection because this is indexed by the name of the TabPage as well as by the order in which they are added to the collection. So, you certainly don't want there to be more than one TabPage with the same name at any point in time.
George Paroglou147 reputationPosted May 17, 2011, 3:23 AM EDT
To explain you the proccess, it is the field that user specifies the text of his search and then the second tabpage assigned is a dataset (or datagridview) that outputs the results of his search. This output is the one I am trying to handle correctly. It may have more than two depending on user's steps. Each step and propably a new tabpage with the same tab but with an updated tab's name.
I tried and open this dataset output but of course is not assigned with its first tabpage tab.
George Paroglou147 reputationPosted May 19, 2011, 3:49 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 19, 2011, 6:47 AM EDT
George Paroglou147 reputationPosted May 20, 2011, 12:36 PM EDT
What do you mean when saying tab property?
VulpesRank #55 · 29.2K reputationPosted May 21, 2011, 2:34 AM EDT
In particular, you can use the Tag property (rather than the Name property) to distinguish between instances of the same control. This has the advantage of not affecting the indexing of the controls within their container's Controls collection and also means you can use duplicate tags if you want.
George Paroglou147 reputationPosted May 22, 2011, 5:46 AM EDT
George Paroglou147 reputationPosted May 22, 2011, 10:41 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 22, 2011, 10:53 AM EDT
George Paroglou147 reputationPosted May 22, 2011, 11:34 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 23, 2011, 11:13 AM EDT
George Paroglou147 reputationPosted May 23, 2011, 1:29 PM EDT
At the very beginning I was trying to make this tab and tabpage synchronization by using a code with key assignment.... do you think this should be the appropriate way of initially create the tabs and their tabpages or do you suggest to leave them with the text name assignment and just add the tag
VulpesRank #55 · 29.2K reputationPosted May 24, 2011, 1:18 AM EDT
George Paroglou147 reputationPosted May 25, 2011, 2:44 AM EDT
what do you suggest I should do to assign the new proccess form to the tabpage,tab?
George Paroglou147 reputationPosted May 26, 2011, 4:39 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 26, 2011, 10:28 AM EDT
George Paroglou147 reputationPosted May 29, 2011, 6:24 AM EDT
I found this example in vb ( http://blogs.vbcity.com/xtab/archive/2007/06/25/8465.aspx)
Do you think it could be done to hide the old tabpage and its tab and open a new one in the same place at it was? and If later on I want to go back to the hidden tab-tabpage just show() it?
I am thinking and the possiblity of overloading either pc's proccess power or memory's capacity....
VulpesRank #55 · 29.2K reputationPosted May 29, 2011, 9:25 AM EDT
As explained in the article, the key is to save the TabPage to a temporary field before you remove it from the TabPages collection. You can then restore it to its previous position with all its controls still in tact.
George Paroglou147 reputationPosted May 29, 2011, 10:45 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 30, 2011, 1:55 AM EDT
You can probably stick to using the Name property with this approach as you never seemed comfortable with using the Tag property instead.
George Paroglou147 reputationPosted May 30, 2011, 5:58 AM EDT
Vulpe can you please convert for me the codes of the second article from vb to c#?
VulpesRank #55 · 29.2K reputationPosted May 30, 2011, 6:24 AM EDT
George Paroglou147 reputationPosted May 30, 2011, 10:31 PM EDT
these fields ( private TabPage TempTab; private int TempTabIndex; ) I have to add them where?
I am trying to add the code of the first snippet inside my toolStripButton2_Click...
VulpesRank #55 · 29.2K reputationPosted May 31, 2011, 3:51 AM EDT
The fields should be placed near the top of the form class:
class Form1 : Form
{
}