StillLearning
Member
- Joined
- Dec 21, 2012
- Messages
- 12
- Programming Experience
- Beginner
Hey awesome folks!
I know I CAN do it either way. I have a public button, "ButtonExit" which I can "re-use" by adding it to the selected tab on the MyTabControl.SelectedIndexChanged event.
Interestingly, it is automatically removed from the original tab so I just add it back when that tab is re-selected.
Is there some reason not to be moving controls around? Is there some reason this is a good practice, and thus I should I just create a different ButtonExit control for each tab?
I can go from tab to tab to tab and the EventHandler never loses that ButtonExit's presence...
Thank you!!
I know I CAN do it either way. I have a public button, "ButtonExit" which I can "re-use" by adding it to the selected tab on the MyTabControl.SelectedIndexChanged event.
Interestingly, it is automatically removed from the original tab so I just add it back when that tab is re-selected.
VB.NET:
tlp1.Controls.Add(ButtonExit, 0, 0)
tlp2.Controls.Add(ButtonExit, 0,0) 'etc.
'my ButtonExit is actually in a TableLayoutPanel(tlp1 for tab1, tlp2 for tab2, etc) which I think is irrelevant, but you never know...
Is there some reason not to be moving controls around? Is there some reason this is a good practice, and thus I should I just create a different ButtonExit control for each tab?
I can go from tab to tab to tab and the EventHandler never loses that ButtonExit's presence...
Thank you!!