Altova MobileTogether Designer

HTML Labels can be used if you want to to generate varying styles within a single label.

 

When you use a regular Label control, the styles that you assign in the Styles & Properties pane are assigned to the entire label and the text within the label cannot have different styles. Inside an HTML label, however, you can enter text that is marked up with HTML elements/attributes and CSS styles. The screenshot below shows an HTML Label in the design. With the Multiline property set to true, the text will run on across lines and will not be truncated by the control's width.

MTControlHTMLLabelIn

When this text is displayed on a mobile device, it will be displayed with the formatting defined by the HTML markup you entered.

MTControlHTMLLabelOut

HTML elements

In an HTML Label, you can use the following HTML elements (marked red below):

 

<a href="https://www.altova.com">Creates a link</a>

<b>bold</b>, <strong>bold</strong>

<i>italic</i>, <cite>italic</cite>, <dfn>italic</dfn>, <em>italic</em>

<u>underline</u>

<strike>line-through</strike>

 

HTML attributes

You can use href and style attributes, marked green below:

 

<a href="...">Creates a link</a>

<span style="font-style: italic; font-weight: bold">bold and italic</span>

 

CSS styles

You can use the CSS style properties font-style , font-weight, and text-decoration, marked blue below:

 

<span style="font-style: italic; font-weight: bold">bold and italic</span>

 

Block elements

HTML block elements are not supported. To create a block, in an HTML Label, use a newline before and a newline after the text you want to mark as a block.

 

Static content only

The text content of the HTML Label is static, directly entered by you as HTML-marked-up text. You cannot enter dynamic content as part of static text. If you do, then the entire static content will be replaced by the dynamic content and you will need to format via the Styles & Properties pane.

 

 

HTML Label events

The OnLabelClicked event is available. To define actions for the label's OnLabelClicked event, right-click the label and, from the context menu that appears, select Control Actions for OnLabelClicked. This displays the Actions dialog for label events. For a description of the actions that can be defined for this event, see the Actions section.

 

 

HTML Label properties

The control's properties are available in the Styles & Properties Pane, and are listed below in the order in which they appear.

 

 

© 2018-2024 Altova GmbH