Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to show simple HTML text in cells

$
0
0
This sample illustrates how to implement a custom editor to visualize simple HTML. You can use HTML tags (e.g. <b>, <i>, <u>, <s>, <href>) to make your text more informative and interactive.



The editor was inherited from TextEdit, which already allows drawing simple HTML strings. But, this capability is disabled in TextEdit. To implement it  in our custom editor, override TextEdit's AllowHtmlString property to return "true" all the time.
[C#]
publicoverrideboolAllowHtmlString{get{returntrue;}}
So now, our SimpleHtmlEdit can draw HTML strings. To make it more interactive, a few lines of code were added to handle the cursor's changing capability and open links in a browser.

See also:
HTML Text Formatting
General information about custom editors

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>