Click here to Skip to main content
13,347,671 members (49,206 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Dear Friends,

Here i Developed an Application of Which we are Converting the language from English to Arabic All Controls are working fine.But in the case of TabControl when iam converting the tab layout from right to left in Arabic language the tabpage is not changing from Left Side.Actually when language changes tab page should display on right side.Actually For Dispalying Close Button on Tab control i use to dray the Icon on Tabpage For that i have written a code.

private void rptEvaluationReport_Ar_Load(object sender, EventArgs e)

             PreRemoveTabPage2 = null;

             this.tabControl_Textual.DrawMode = TabDrawMode.OwnerDrawFixed;




private void DrawEvaluationTextual()
          Bitmap bmp = new Bitmap(16, 16);
          using (Graphics g = Graphics.FromImage(bmp))
              using (SolidBrush sb = new SolidBrush(this.tabControl_Textual.TabPages[0].ForeColor))
                  g.DrawString("x", this.tabControl_Textual.Font, sb, new PointF(2, 0));


          this.tabControl_Textual.ImageList = this.imageList1;

          foreach (TabPage t in tabControl_Textual.TabPages)
              t.UseVisualStyleBackColor = true;
              t.ImageIndex = 0;

And for Draw Item i have written a code of

private void tabControl_Textual_DrawItem(object sender, DrawItemEventArgs e)
              using (SolidBrush sb = new SolidBrush(this.tabControl_Textual.TabPages[0].ForeColor))
                    this.tabControl_Textual.Font, sb,
                    new PointF(e.Bounds.X + 4, 4));
                e.Bounds.X + e.Bounds.Width - this.imageList1.Images[0].Width - 1,


This code is working fine For English Language But when i convert the language to Arabic the tab page is not displaying on Right side.So where i have done a mistake if anything like that please share with me.


Posted 2-Jan-13 22:12pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100