TabPage Title

BigC

New member
Joined
Apr 17, 2006
Messages
4
Programming Experience
Beginner
Hello all,

I have a form with a TabControl. The additional tabs are being opened via a button located in a datagrid control.

In the tabpage that opens, I want to title that tab with the contents of the column of the button.

Example:
The column is the "CustomerID". When that button is clicked, I want to have THAT customer's CustomerID as the tabpage title.

I know that I have to use the |tabpage.Text = ""| to title that tab. But, how, progrmatically, can this be done, perhaps pulling from the database field directly at run time?


Any help would be greatly appreciated!

Thanks,
Carlos
 
Yes - the column is in a datagrid.

I have changed that column, in the datagrip to display as a button.

Click the button, a new tab opens.

The title is generic - I need to display the contents of that column in the tab title.

Once I can do this, I would also be able to set up the tool tips to do the same, with multiple columns.

THANKS!
 
This should be an interesting question, and I can't imagine being the only one out there wanting to do this.

Anyone?

Anything?
 
:) Talk about impatient, people dont spend all day on forums you know. Just retrieve the value from that column and use the .Text property like you said.

Unless you are saying that each button has the exact same text? I havnt got VS open so I cant be sure but is there not some way to store the value of a cell and keep the button with whatever text, in the datagrid? (Are you using a a datagridview?) If there is no way to store both in the grid, then store the CustomerID's in an array somewhere and when the button is clicked retrieve the value from the array.
 
That sounds like an interesting, I'll give it a shot.

Thanks.

By the way, I was not being impatient. Just attempting to bring the subject to the attention of other, smarter then I people out there and wanted to maintain the thread closer to the top.

Perhaps a bit unethica in terms of posting.

Just thought this an worthwhile enough coding problem.

Arrays... I'll use them.
 
Back
Top