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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:22:54+00:00 2026-06-02T09:22:54+00:00

Is it possible to align the image icon from on a TabControl’s ImageList to

  • 0

Is it possible to align the image icon from on a TabControl’s ImageList to the right of the text?

Right now, the image icon gets put on the left, and the text is to the right of that. I would prefer the text to be on the left, and the icon to the right of that. Is this possible?

  • 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-02T09:22:58+00:00Added an answer on June 2, 2026 at 9:22 am

    You can not do that unless you Draw the TabPage yourself. To do that you need to set the DrawMode property of the TabControl to OwnerDrawFixed and then handle the DrawItem Event.

    This is a very simple example to do that, you can add some code to change the background color of the selected tab if you wish, to know which tab is selected just check the e.State value:

    private void tabControl1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
    {
        // values
        TabControl tabCtrl = (TabControl)sender;
        Brush fontBrush = Brushes.Black;
        string title = tabCtrl.TabPages[e.Index].Text;
        StringFormat sf = new StringFormat();
        sf.Alignment = StringAlignment.Near;
        sf.LineAlignment = StringAlignment.Center;
        int indent = 3;
        Rectangle rect = new Rectangle(e.Bounds.X, e.Bounds.Y + indent, e.Bounds.Width, e.Bounds.Height - indent);
    
        // draw title
        e.Graphics.DrawString(title, tabCtrl.Font, fontBrush, rect, sf);
    
        // draw image if available
        if (tabCtrl.TabPages[e.Index].ImageIndex >= 0)
        {
            Image img = tabCtrl.ImageList.Images[tabCtrl.TabPages[e.Index].ImageIndex];
            float _x = (rect.X + rect.Width) - img.Width - indent;
            float _y = ((rect.Height - img.Height) / 2.0f) + rect.Y;
            e.Graphics.DrawImage(img, _x, _y);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to align both the text and image above the JRadioButton icon?
Possible Duplicate: How do I vertically align text next to an image with CSS?
Is is possible to align a background image according to where the text ends?
s it posible to align an image to the right and wrap text around
Im using a td.Image class that has text-align:center; to center images in a table
Is it possible? Align the text fully justified? Does anyone know any hack or
I have a panel of labels, buttons and image that I wish to put
Is it possible to create a Floated Image with text flowing around it in
Is it possible to align multiple sized text by bounding center (of each size)
Is it possible to align this using CSS, so the text will be vertically

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.