Quantcast
Viewing all articles
Browse latest Browse all 12583

Difficulty formatting pages added to Tab Control

Hello Helpful people,

I'm trying to build a flexible planner that allows users to create different types of pages in a tab control. The difficulty is that the only page that I'm able to format is the last one appearing in the tab control. Below is the code. If I modify the number of pages to, for example, 6 or 7, then still the last page, and only the last page, contains the panel I've formatted and want appearing in each page. Any idea why this is happening?

Thanks in Advance,

Cam

        ReDim page(5)
        For r = 1 To 5
            page(r) = New TabPage
            With page(r)
                .BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
                .Controls.Add(Me.Panel1)
                .Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
                .Location = New System.Drawing.Point(4, 33)
                .Padding = New System.Windows.Forms.Padding(3)
                .Size = New System.Drawing.Size(987, 600)
                .Text = "Block " + LTrim(Str(r))
                Day.Controls.Add(page(r))
            End With
        Next


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>