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 8667739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:02:41+00:00 2026-06-12T18:02:41+00:00

I am trying to make the tabs show horizontally on the right side of

  • 0

I am trying to make the tabs show horizontally on the right side of my form. I can’t use tabcontrol from tool box because of how the text displays.
I am using a code that I found to help me. But after exhausting all of my resources I can’t seem to get the code to point to the tabPages collection. I have entries in there but the tabs show up blank.

 Public Sub New()
    tabControl1 = New TabControl()
    Dim tabPage1 As New TabPage()

    ' Sets the tabs to be drawn by the parent window Form1. 
    ' OwnerDrawFixed allows access to DrawItem. 
    tabControl1.DrawMode = TabDrawMode.OwnerDrawFixed

    tabControl1.Controls.Add(tabPage1)
    tabControl1.Location = New Point(25, 25)
    tabControl1.Size = New Size(250, 250)

    tabPage1.TabIndex = 0

    myTabRect = tabControl1.GetTabRect(0)

    ClientSize = New Size(300, 300)
    Controls.Add(tabControl1)

    AddHandler tabControl1.DrawItem, AddressOf OnDrawItem
End Sub!

tab Example

  • 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-06-12T18:02:43+00:00Added an answer on June 12, 2026 at 6:02 pm

    I ended up compiling this code from different sources to get this working,

        Private Sub TabControl1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem
        Dim g As Graphics
        Dim sText As String
    
        Dim iX As Integer
        Dim iY As Integer
        Dim sizeText As SizeF
        Dim ctlTab As TabControl
    
        Dim r As New RectangleF(e.Bounds.X, e.Bounds.Y + 2, e.Bounds.Width, e.Bounds.Height - 2)
    
        ctlTab = CType(sender, TabControl)
    
        g = e.Graphics
    
        sText = ctlTab.TabPages(e.Index).Text
        sizeText = g.MeasureString(sText, ctlTab.Font)
    
        iX = e.Bounds.Left + 6
        iY = e.Bounds.Top + (e.Bounds.Height - sizeText.Height) / 2
    
        g.DrawString(sText, ctlTab.Font, Brushes.Black, iX, iY)
    End Sub
    

    The text doesn’t show up in the RAD but it does when I debug/run it.

    Many thanks to LUC001 @ http://www.dreamincode.net/forums/topic/125792-how-to-make-vertical-tabs/

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

Sidebar

Related Questions

I am trying to make use of jQueryUI AJAX tabs in my ASP.Net Webforms
I am trying to make a jquery similar tabs. since its for single use
While trying to make an automator action that opens multiple tabs from selected text
So i'm trying to make tabs with the JQuery UI framework, but I can't
I'm trying to make the background of all tabs from a TabNavigator completely transparent
Short question: I'm trying to make that in a given page (uses tabs) back
I have some jQuery tabs on a website and I am trying to make
Trying to make the infamous checkall checkbox for dynamically created rows from a MySQL
I'm trying to make tabs and am using easytabs. By the below code, the
I am trying to make a user generated nav bar. This nav bar because

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.