Hi there, I'm having a lot of trouble trying to add a new control to a dynamically created TabPage at run time, I have viewed many threads with similar help requests and cant seem to make the codes work! :(
Any help would be greatly appreciated...
Here's what I've got:
Dim albumscount As Xml.XmlNodeList albumscount = config_doc.SelectNodes("component/config/menu/album") i = albumscount.Count - 1 Dim albumtitle As Xml.XmlNode Dim newtab As New TabPage Dim x As Integer Dim newctrl As New TextBox For Each albumtitle In albumscount newtab.Name = albumtitle.Attributes.GetNamedItem("title").Value newtab.Text = newtab.Name TabControl1.Controls.Add(newtab) x = newtab.TabIndex TabControl1.TabPages.Item(x).Controls.Add(newctrl) Next