TextBlock
<TextBlock> controls are used to format text blocks within Web Apps.
TextBlock controls are defined using 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 include the following elements:
- Free text
<Binding><Break><Span><Translation><Link>
A Paragraph can be defined using the following attributes:
| Attribute | Description |
|---|---|
background | Defines a color for the background of the control.
Possible values:
|
| Defines the font family.
Possible values:
|
| Defines the font size.
Possible values:
|
| Sets the width of the single characters. This attribute overrides the default width of the characters of the Web App for this control. Possible values:
This attribute does not work with the |
| Defines the font style. This attribute overrides the default style of the characters of the Web App for this control. Possible values:
This attribute does not work with the |
| Defines the font weight. This attribute overrides the default font weight of the Web App for this control. Possible values:
This attribute does not work with the |
| Defines the font color. This setting overwrites the default color of the color scheme! Possible values:
Do not use a hash in front of the color value! Do not use a shortened notation of the color value!
|
justifyText | Defines the text alignment within the text block. Possible values:
|
textOverflow | Defines what happens if the control has reached its space limit. Possible values:
|
Example <Paragraph>
<Paragraph justifyText="justify" textOverflow="allow">
Paragraph
<Binding value="#test" />
</Paragraph>
Span
The <Span> element is used to format text segments or single text elements 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 |
|---|---|
background | Defines a color for the background of the control.
Possible values:
|
fontFamily | Defines the font family.
Possible values:
|
fontSize | Defines the font size.
Possible values:
|
fontStretch | Sets the width of the single characters.
This attribute overrides the default width of the characters of the Web App for this control.
Possible values:
This attribute doesn't work with the |
fontStyle | Defines the font style.
This attribute overrides the default style of the characters of the Web App for this control.
Possible values:
|
fontWeight | Defines the font weight.
This attribute overrides the default font weight of the Web App for this control.
Possible values:
This attribute doesn't work with the |
foreground | Defines the font color. This setting overwrites the default color of the color scheme! Possible values:
|
Example <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 <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 |
|---|---|
value | Binds a valid data binding string. Note that constants are not allowed. |
Example <Binding>
<Span>
Span with binding
<Break />
value = '<Binding value="#test" />'
</Span>
Translation
The <Translation> element is used to specify a translation key for multilingual Web apps.
The Translation element is defined using the following attribute:
| Attribute | Description |
|---|---|
value | Specifies the translation key. |
Example <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>