RichText — Static text with HTML-like formatting
RichText
( | string | text
) ; |
don't interpret text as HTML
automatically scroll down for each text change
make the widget very small
A RichText is a text area with two major differences to a Label: The amount of data it can contain is not restricted by the layout and a number of control sequences are allowed, which control the layout of the text.
// Example for a RichText widget { UI::OpenDialog( `opt(`defaultsize), `VBox( `RichText( "<h3>RichText example</h3>" + "<p>This is a <i>RichText</i> widget.</p>" + "<p>It's very much like <i>HTML</i>, but not quite as powerful.</p>" + "<p><b>bold</b> and <i>italic</i> you can rely on.</p>" + "<p>" + "<font color=blue>colored </font>" + "<font color=red> text </font>" + "<font color=green> might </font>" + "<font color=magenta> or </font>" + "<font color=cyan> might </font>" + "<font color=blue> not </font>" + "<font color=red> be </font>" + "<font color=green> available,</font>" + "<font color=magenta> depending </font>" + "<font color=cyan> on </font>" + "<font color=blue> the </font>" + "<font color=red> UI. </font>" + "</p>" + "<p>The product name is automatically replaced by the UI." + "Use the special macro <b>&product;</b> for that." + "</p><p>" + "The current product name is <b>&product;</b>." + "</p>" ), `PushButton(`opt(`default), "&OK") ) ); UI::UserInput(); UI::CloseDialog(); } |