TabPage with HTML Text

Answered
0
0

Hey

How can I display the TabPage Text with HTML Tag?

TabPage does not seem to provide “AllowHTML” property

Please give me some information to this.

THX and have a happy new year

  • You must to post comments
Best Answer
1
1

You can create a custom TabPageHtml class like this:

public class TabPageHtmlText : TabPage
{
  protected override void OnWebRender(dynamic config)
  {
    base.OnWebRender((object)config);

    // escape the html text.
   config.caption = TextUtils.EscapeText(this.Text, true /* allowHtml */, this.UseMnemonic, false);
   }
}

All it needs is to escape the html text differently to allow for html tags.

Be careful with the html since the tab buttons may not be able to fully adjust their size. See small test below using <b>tabPage</b><big><big><big>4</big></big></big></big>.

screen

  • You must to post comments
0
0

Cool Stuff!

Thx, works 100% fine!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.