Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6380513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:16:39+00:00 2026-05-25T02:16:39+00:00

I’m trying to add a tabPage to an existing TabControl named TabControl4 I went

  • 0

I’m trying to add a tabPage to an existing TabControl named TabControl4
I went all over it with the Debugger and everything is fine, but it won’t show the TabPage in the TabControl.
That’s the code, Notice all the information being added to the TabPage is retrieved from a database so don’t pay any attention to it, plus the software is in Hebrew so just ignore the Hebrew Strings.

Table = DataBase.OpenRecordset("AthInj")
    Table.Index = "PrimaryKey"
    Table.Seek("=", AthId)
    Dim day1() As String = Table.Fields("injDay1").Value.ToString.Split("^")
    Dim month1() As String = Table.Fields("injMonth1").Value.ToString.Split("^")
    Dim year1() As String = Table.Fields("injYear1").Value.ToString.Split("^")
    Dim day2() As String = Table.Fields("injDay2").Value.ToString.Split("^")
    Dim month2() As String = Table.Fields("injMonth2").Value.ToString.Split("^")
    Dim year2() As String = Table.Fields("injYear2").Value.ToString.Split("^")
    Dim injs() As String = Table.Fields("inj").Value.ToString.Split("$")
    Dim treats() As String = Table.Fields("treat").Value.ToString.Split("$")
    Dim rehabs() As String = Table.Fields("rehab").Value.ToString.Split("$")
    For i As Integer = 0 To injs.Length - 2
        Dim tp As New TabPage
        tp.Text = "פציעה " & (i + 1)
        tp.Name = "inj" & i
        Dim bday1 As New ComboBox
        Dim bmonth1 As New ComboBox
        Dim byear1 As New ComboBox
        Dim bday2 As New ComboBox
        Dim bmonth2 As New ComboBox
        Dim byear2 As New ComboBox
        Dim da As Label
        Dim label1 As Label
        Dim label3 As Label
        Dim label4 As Label
        Dim multiText As New TextBox
        Dim ill As New TextBox
        Dim date2 As Label
        Dim rehabText As New TextBox
        da = setLabel("מתאריך:", "injda" & i, 17, 560)
        label1 = setLabel("הפציעה/מחלה:", "inj" & i, 133, 490)
        date2 = setLabel("עד לתאריך:", "date2" & i, 67, 560)
        label3 = setLabel("דרכי הטיפול:", "injtreat" & i, 187, 473)
        label4 = setLabel("דרכי השיקום:", "injrehab" & i, 326, 470)
        copyCombo(bday2, bday, i, 60, bday.Width, 71)
        copyCombo(bmonth2, bmonth, i, 230, bmonth.Width, 71)
        copyCombo(byear2, byear, i, 396, byear.Width, 71)
        bday2.Name = "bday2" & i
        bmonth2.Name = "bmonth2" & i
        byear2.Name = "byear2" & i
        byear2.SelectedIndex = byear2.FindStringExact(year2(i))
        bmonth2.SelectedIndex = month2(i)
        bday2.SelectedIndex = day2(i)
        copyCombo(bday1, bday, i, 60, bday.Width, da.Top + 4)
        copyCombo(bmonth1, bmonth, i, 230, bmonth.Width, da.Top + 4)
        copyCombo(byear1, byear, i, 396, byear.Width, da.Top + 4)
        byear1.SelectedIndex = byear1.FindStringExact(year1(i))
        bmonth1.SelectedIndex = month1(i)
        bday1.SelectedIndex = day1(i)
        setTextBox(ill, 138, 80, "ill" & i, False, ScrollBars.None, 400)
        ill.Text = injs(i)
        setTextBox(multiText, 191, 32, "treatText" & i, True, ScrollBars.Vertical, 399)
        setTextBox(rehabText, 330, 32, "rehabText" & i, True, ScrollBars.Vertical, 399)
        multilineToBox(treats(i), multiText)
        multilineToBox(rehabs(i), rehabText)
        With tp.Controls
            .Add(rehabText)
            .Add(ill)
            .Add(date2)
            .Add(bday2)
            .Add(bmonth2)
            .Add(byear2)
            .Add(da)
            .Add(label1)
            .Add(label3)
            .Add(label4)
            .Add(bday1)
            .Add(bmonth1)
            .Add(byear1)
            .Add(multiText)
        End With
        tp.AutoScroll = True
        tp.BackColor = Color.White
        tp.RightToLeft = Windows.Forms.RightToLeft.Yes
        TabControl4.Controls.Add(tp)
    Next
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:16:40+00:00Added an answer on May 25, 2026 at 2:16 am

    I just knocked up a little test app with a blank form and then added a TabControl and named it tabcontrol1.

    Then in the form load event added the following

    Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    
        Dim textbox1 As New TextBox With {.Text = "Textbox 1"}
        Dim tabPage1 As New TabPage With {.Text = "TabPage 1"}
    
        Dim textbox2 As New TextBox With {.Text = "Textbox 2"}
        Dim tabPage2 As New TabPage With {.Text = "TabPage 2"}
    
    
        tabPage1.Controls.Add(textbox1)
        tabPage2.Controls.Add(textbox2)
    
        TabControl1.TabPages.Add(tabPage1)
        TabControl1.TabPages.Add(tabPage2)
    
    End Sub
    

    And everything worked fine. I think the only bit you have wrong in your code is where you have TabControl4.Controls.Add(tp) instead of TabControl4.TabPages.Add(tp)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I'm trying to select an H1 element which is the second-child in its group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.