2012-01-24 54 views
19

我可以製作一個製表符控件,看起來像附加的圖片嗎?我設法添加一個選項卡控件,但文本仍然是垂直的。我希望它是水平的。C#垂直製表符控制

enter image description here

回答

4

試試這個TabStrip控制。我相信這是你想要的。

+2

剛纔檢查自己 - 勞埃德解決方案比我提供的鏈接要簡單得多。 – silverspoon

0

我覺得這是默認選擇的顏色

private void tabControl1_DrawItem(Object sender, System.Windows.Forms.DrawItemEventArgs e) 
{ 
... 
if (e.State == DrawItemState.Selected) 
    { 

     // Draw a different background color, and don't paint a focus rectangle. 
     _textBrush = new SolidBrush(Color.Black); 
     g.FillRectangle(Brushes.White, e.Bounds); 
    } 
    else 
    { 
     _textBrush = new System.Drawing.SolidBrush(e.ForeColor); 
     g.FillRectangle(Brushes.WhiteSmoke, e.Bounds); 
    } 
... 

image