<TextBlock> can be used to format text blocks within a Web App.
Instructions for use
A <TextBlock> control is created with the <TextBlock> element.
<TextBlock>
...
</TextBlock>
<TextBlock> controls can be used in all available layout types: For more information, see Layouts.
Attribute
The <TextBlock> control is defined via the standard attributes for controls.
Elements
The <TextBlock> element can include the following elements:
-
Free text
-
<Binding> -
<Break> -
<Paragraph> -
<Span> -
<TextLink> -
<Translation>
<Binding> element
The <Binding> element is used for Data Binding.
You can define the following attribute for the <Binding> element:
|
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>
<Break> element
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>
<Paragraph> element
The <Paragraph> element is used to divide texts into different paragraphs and can contain the following elements:
-
Free text
-
<Binding> -
<Break> -
<Paragraph> -
<Span> -
<TextLink> -
<Translation>
You can define the following attribute for the <Paragraph> element:
|
Attribute |
Description |
|---|---|
|
|
Defines a color for the background of the control. Note:
Possible values:
Note:
|
|
|
Specifies the font family. Note:
Possible values:
|
|
|
Sets the font size. Note:
Possible values:
|
|
|
Defines the width of each character. Note:
Possible values:
|
|
|
Defines the tilt of the font. Note:
Possible values:
|
|
|
Defines the font weight. Note:
Possible values:
|
|
|
Defines a color for the foreground (text, etc.) of the control. Note:
Possible values:
Note:
|
|
|
Defines the text alignment within the text block. Possible values:
|
|
|
Specifies what should happen when the control is full. Possible values:
|
Example <Paragraph>
<Paragraph justifyText="justify" textOverflow="allow">
Paragraph
<Binding value="#test" />
</Paragraph>
<Span> element
The <Span> element is used to divide texts into different paragraphs and can contain the following elements:
-
Free text
-
<Binding> -
<Break> -
<Paragraph> -
<Span> -
<TextLink> -
<Translation>
You can define the following attribute for the <Span> element:
|
Attribute |
Description |
|---|---|
|
|
Defines a color for the background of the control. Note:
Possible values:
Note:
|
|
|
Specifies the font family. Note:
Possible values:
|
|
|
Sets the font size. Note:
Possible values:
|
|
|
Defines the width of each character. Note:
Possible values:
|
|
|
Defines the tilt of the font. Note:
Possible values:
|
|
|
Defines the font weight. Note:
Possible values:
|
|
|
Defines a color for the foreground (text, etc.) of the control. Note:
Possible values:
Note:
|
Example for <Span>
<Span fontWeight="ExtraBold" foreground="GaugeAxisMiddle">
Span
<Binding value="#test" />
</Span>
<TextLink> element
The <TextLink> element is used to create a link. To generate the link, an action must be defined. For more information, seeActions.
The following actions are supported:
-
CustomAction
-
DownloadAction
-
SelectAction
-
UploadAction
Example for <TextLink>
<?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>
<Translation> element
The <Translation> element is used to store a translation key for multilingual interfaces.
You can define the following attribute for the <Translation> element:
|
Attribute |
Description |
|---|---|
|
|
Specifies the translation key. |
Example for <Translation>
<Span>
Span with translation
<Break />
value = '<Translation value="$TranslationKey" />'
</Span>
Example