Page 1 of 1

Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 7:23 pm
by M1z23R
I need help with this :
Code: Select all
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).BringToFront()
How can i get controls.item( XXX ), non of the indexes isn't correct :/

Re: Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 7:27 pm
by Axel
How much controls do you have in each tab ?

Re: Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 7:27 pm
by M1z23R
Ok, fixed it myself, sorry for spam :/

Re: Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 7:28 pm
by M1z23R
It was both index (1) :/
I have 1 webbrowser, 1 richtextb, 1 toolstrip

Re: Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 7:46 pm
by M1z23R
Again buged :'(
After i click 1 button, it is like index is changed :(((

Re: Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 7:50 pm
by Axel
Can you use the EDIT button ? Thanks


You can try something like this
Code: Select all
For i as Integer = 0 To TabControl1.SelectedTab.Controls.Count -1
if TabControl1.SelectedTab.Controls(i).Name = "Yourcontrolname"
End if
Next

Re: Me again :/ TabControl.Controls

Posted: Mon May 23, 2011 8:01 pm
by M1z23R
I changed it a little but that is what i wanted, thanks man A LOT !