RoyLittle0
Active member
Can anyone explain how to change the text in a TabControl, i have tried to use the sane tactics i would with a ListView but cant seem to get it right
The name is being read from an xml file based on the selection made from the ComboBox, and from there it will display the contents of the xml in 3 textBoxes and 3 PictureBoxes
There are 10 machines in total, each having 20 pages and the Text and PictureBoxes will display the data based on teh selection, ie, Machine Type (ComboBox), Page Number (TabControl)
The name is being read from an xml file based on the selection made from the ComboBox, and from there it will display the contents of the xml in 3 textBoxes and 3 PictureBoxes
VB.NET:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim NodeCount As Integer
For Each mySet As XmlNode In myXMLDoc.GetElementsByTagName("Machine")
If mySet.Attributes.ItemOf("Type").InnerText = ComboBox1.SelectedItem.ToString Then
For Each myMachineName As XmlNode In mySet.SelectNodes("Page")
NodeCount += 1
Dim TCI As New TabControl
With TCI
.Text = (myMachineName.InnerText)
End With
Next
End If
Next
End Sub
There are 10 machines in total, each having 20 pages and the Text and PictureBoxes will display the data based on teh selection, ie, Machine Type (ComboBox), Page Number (TabControl)
VB.NET:
<Root>
<Machine Type="A Machine">
<Page Number="Page 1, Machine A">
<Title>1</Title>
<TextBox>2</TextBox>
<TextBox>3</TextBox>
<TextBox>4</TextBox>
<PictureBox>5</PictureBox>
<PictureBox>6</PictureBox>
<PictureBox>7</PictureBox>
<Link>8</Link>
</Page>
<Page Number="Page 2, Machine A">
<Title>9</Title>
<TextBox>10</TextBox>
<TextBox>11</TextBox>
<TextBox>12</TextBox>
<PictureBox>13</PictureBox>
<PictureBox>14</PictureBox>
<PictureBox>15</PictureBox>
<Link>16</Link>
</Page>
<Page Number="Page 3, Machine A">
<Title>17</Title>
<TextBox>18</TextBox>
<TextBox>19</TextBox>
<TextBox>20</TextBox>
<PictureBox>21</PictureBox>
<PictureBox>22</PictureBox>
<PictureBox>23</PictureBox>
<Link>24</Link>
</Page>
</Machine>
</Root>
Last edited: