Hello guys!
I have a little issue with tab control.
I have add to a form a TABCONTROL with 4 tabs. My problem is that I have added 3 label + 3 textboxes which are shown only in tab1. Is there a way to show them in all tabs?
Thank you
stratos
Printable View
Hello guys!
I have a little issue with tab control.
I have add to a form a TABCONTROL with 4 tabs. My problem is that I have added 3 label + 3 textboxes which are shown only in tab1. Is there a way to show them in all tabs?
Thank you
stratos
If you want to show these labels and textboxes on all the tabs, why have tabs at all?
If you need tabs for other purposes and you want these to show on all for some purpose, maybe continuity, you have two options.
1. make your tab control smaller and place the labels and textboxes on the form so they are always visible.
2. Make new textboxes and labels for each tab, make them the same size and position on each tab so it looks like they don't change. You will need to populate them all each time the display data changes though.
Haven't thought to place them out of the tab control...:/
I want them in all tabs because I would like to change a tab and also change properties of labels and textboxes. So, I only need 3 labels + 3 text boxes and just change them while change the tabs.
I suppose that the best method is to place them out of the tab control and write a code to change them when press a tab...
You could do that but I would not suggest that it's the best option. I would suggest that you place controls on each page and populate each set of controls with appropriate data and then you don't need any code when the page changes. Create a user control that contains the set of controls that you want on each page and then add an instance of that user control to each TabPage when you create it.
If you really want to use the same set of controls then you can place them on the form and set their Location in the properties window so that they appear over the TabControl. You can right-click a control and select Bring To Front or Send To Back or else use the Document Outline window to set the z-order so that the controls are not covered by the TabControl.