Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

Am trying to add a richtextbox to every tab page as they are added, but am all out of ideas now.

 

Any help would be nice.

Thanks!

 

'This only adds tabs not boxes.
Dim i As Integer
       Dim Tab As New TabPage()
       Dim Rich As New RichTextBox()
       Rich.Location = New System.Drawing.Point(-1, 0)
       Rich.Size = New System.Drawing.Size(658, 176)

       For i = 0 To 9
           Tab.Text = "Tab" & i
           tbMain.Controls.Add(Tab)
           Tab.Controls.Add(Rich)
       Next i

Posted

I can't believe it, every time I post for help I come up whit an answer. :)

 

Anyways i got it to work like this:

       Dim i As Integer

       For i = 0 To 90
           Dim Tab As New TabPage("Tab" & i)
           Dim Rich As New RichTextBox()
           Rich.Location = New System.Drawing.Point(-1, 0)
           Rich.Size = New System.Drawing.Size(658, 176)
           tbMain.Controls.Add(Tab)
           Tab.Controls.Add(Rich)
       Next i

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...