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 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>.
Cool Stuff!
Thx, works 100% fine!
Please login first to submit.