<TextBlock> controls can be used to format text blocks within a Web App.
The <TextBlock> control is defined via the general attributes for controls.
The <TextBlock> element can include the following elements:
-
Free text
-
<Paragraph> -
<Binding> -
<Break> -
<Span> -
<Translation> -
<Link>
Paragraph
The <Paragraph> element is used to divide texts into different paragraphs and can contain the following elements:
-
Free text
-
<Binding> -
<Break> -
<Span> -
<Translation> -
<Link>
A Paragraph can be defined using the following attributes:
|
Attribute |
Description |
|---|---|
|
|
Defines a color for the background of the control.
Possible values: |
|
|
Specifies the font family.
Possible values:
|
|
|
Sets the font size.
Possible values:
|
|
|
Defines the width of each character. This attribute overrides the default character width for this layout. Possible values:
This attribute does not work for the |
|
|
Defines the tilt of the font. This attribute overrides the default font tilt for this layout. Possible values:
|
|
|
Defines the font weight. This attribute overrides the default font weight for this layout. Possible values:
This attribute does not work for the |
|
|
Defines the font color. This setting overrides the default color of the color scheme.
|
|
|
Defines the text alignment within the text block. Possible values:
|
|
|
Specifies what should happen when the control is full. Possible values:
|
Example for <Paragraph>
<Paragraph justifyText="justify" textOverflow="allow">
Paragraph
<Binding value="#test" />
</Paragraph>
Span
The <Span> element is used to divide texts into different paragraphs and can contain the following elements:
-
Free text
-
<Binding> -
<Break> -
<Span> -
<Translation> -
<Link>
The Span element can be defined using the following attributes:
|
Attribute |
Description |
|---|---|
|
|
Defines a color for the background of the control.
Possible values: |
|
|
Specifies the font family.
Possible values:
|
|
|
Sets the font size.
Possible values:
|
|
|
Defines the width of each character. This attribute overrides the default character width for this layout. Possible values:
This attribute does not work for the |
|
|
Defines the tilt of the font. This attribute overrides the default font tilt for this layout. Possible values:
|
|
|
Defines the font weight. This attribute overrides the default font weight for this layout. Possible values:
This attribute does not work for the |
|
|
Defines the font color. This setting overrides the default color of the color scheme.
|
Example for <Span>
<Span fontWeight="ExtraBold" foreground="GaugeAxisMiddle">
Span
<Binding value="#test" />
</Span>
Break
The <Break> element is used to insert line breaks within a text section.
Example for <Break>
<Paragraph>
SoftProject GmbH
<Break/>
Am Erlengraben 3
<Break/>
D-76275 Ettlingen
<Break />
E-Mail: info@softproject.de
</Paragraph>
Binding
The <Binding> element is used for Data Binding.
The Binding element is defined using the following attribute:
|
Attribute |
Description |
|---|---|
|
|
Binds a valid data binding string. Note that no constants are allowed. |
Example for <Binding>
<Span>
Span with binding
<Break />
value = '<Binding value="#test" />'
</Span>
Translation
The <Translation> element is used to store a translation key for multilingual interfaces.
The Translation element is defined using the following attribute:
|
Attribute |
Description |
|---|---|
|
|
Specifies the translation key. |
Example for <Translation>
<Span>
Span with translation
<Break />
value = '<Translation value="$TranslationKey" />'
</Span>
Link
The <Link> element is used to create a link. To generate the link, an action must be defined.
The following actions are supported:
-
Upload Action
-
Download Action
-
Select Action
-
CustomAction
Example
<?xml version="1.0" encoding="UTF-8"?>
<DetailComponent xmlns="http://softproject.de/webapp/1.0">
<FlowLayout>
<Header value="Welcome to my new Web App!" />
<TextBlock>
<Link>
<SelectAction
process="myProcess.wrf"
displayName="Click here"></SelectAction>
</Link>
</TextBlock>
</FlowLayout>
</DetailComponent>