المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : int to string



C# Programming
05-25-2013, 03:14 PM
im trying to remove a tab page from my tabcontrol

based on its tab index

but i have the tab index in an int

heres the code

if (e.Button == MouseButtons.Right) { for (int i = 0; i < tabControl1.TabCount; i++) { Rectangle r = tabControl1.GetTabRect(i); if (r.Contains(e.********)) { // MessageBox.Show("TabPressed: " + i); if (i == 0) { } else { string tabindexint = i.ToString(); tabControl1.TabPages.Remove(i);

it wont let me use an interger as a tab index how could i possibly do this