i
This is not the latest version of this document; to access the latest version, click here.
Official Content

It indicates if the contents of the control must be interpreted as a text or as an HTML code.

In the case of Attributes, the format property of the controls associated to the Attribute will inherit the value of this property (which can be modified using the Format property of the control).

Syntax

Control.Format = HTML|Text|RawHtml|Text with meaningful spaces

Values

Text The content of the control will be interpreted as text. Leading spaces are ignored. This is the default value.
HTML The content of the control will be interpreted as HTML code.
RawHtml The same as HTML, but the content will not appear between the tags <SPAN> and </SPAN>.
Use this option when you need to add HTML and you do not want to apply any style to it.
Text with meaningful spaces It’s the same as “Text”, except that leading spaces and spaces in the middle of a sentence are shown as they are. In the case of “Text” value, two or more spaces are interpreted as only one.

 

This property is exclusively enabled when the Read only property is enabled, and can be used in design and execution time.

Considerations

When using the RawHTML option; when executing a User Event it is not possible to modify its value.
RawHTML option means that the developer is in charge of the code in the control; GeneXus does not include the content on a container; later GX cannot locate it in runtime. If you need to change its value in a User Event use the HTML option.

 

Example

A Text Block contains the string "<b>Hello</b>".
If the Format property has the ‘HTML’ value, you will visualize the text Hello with ‘Bold’ format at execution, like this: Hello
If the property has the ‘Text’ value you will visualize the whole string, including the html tags, like this: <b>Hello</b>

Scope

Objects Transaction object, Web Panel object
Controls Attributes, Edit Controls, Text Block control
Languages .NET, Java, Ruby
Interfaces Web
   

See also

Extended Data Types Read-Only property
TitleFormat Property




Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant