Areeb
Areeb

Reputation: 211

wrap text in Tab control

I have two question regarding Tab control of .net(3.5). I am working on windows application.

  1. Wrap text in Tab control(title) so that it will come in two lines
  2. Round corner insted of square corner of tab control

Please suugest how can I do using vb.net or C#.

Thanks

Upvotes: 2

Views: 2379

Answers (2)

Matt Wilko
Matt Wilko

Reputation: 27322

You can't wrap the text automatically but you can put more than one line by inserting a carriage return (this can only be done at runtime)

When you do this however you need to also adjust the Height of the Tab to accomodate the two lines of text:

    With TabControl1
        'Increase the size of the tabs
        .ItemSize = New Size(.ItemSize.Width, .ItemSize.Height * 2)

        'Put two lines of text on the first tab
        .TabPages(0).Text = "Foo" + Convert.ToChar(13) + "Bar"

    End With

Upvotes: 3

Thorsten Dittmar
Thorsten Dittmar

Reputation: 56697

Use WPF - then you can style the tabs just as you like. In Windows Forms this will not be possible as far as I know.

Upvotes: 0

Related Questions