Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

question: how to make each tab on a tabcontrol the same

BoulderCaseyBoulderCasey Posts: 1Member
I am writing a blackjack app in C#, using windows forms. No web stuff here, this is plain-Jane Windows stuff. There are 5 players allowed. Players can be configured in a tab control. Each player has a tab. Each tab has about 15 items on it. Originally, I copied everything in the first tab and pasted it into the other tabs, then renamed everything single control and variable to be something like Name_Player1 or Name_Player2. It was a pain, but I thought I was done. Nope. I later realized I needed to totally revamp the layout. That was a problem, because after making a lot of aesthetic and structural changes to the first tab, I then needed to duplicate the changes on the other tabs. That'll be a ton of work, especially because each tab needs to look consistent. I am now thinking what I need is a template of some sort. Some way to have only one master form that will show up on each tab. Like having only one "Name" text box that is shared on all 5 tabs, yet I can refer to each tab's "Name" with a foreach loop. Or something like that. Ideas?

I can, of course, use the cut'n paste method again. But then if I decide to revamp later down the road, I'll have to go through this mini-hell yet again.

BoulderCasey

Sign In or Register to comment.