====== Paragraph Control ======
Textview control for not editable descriptive text, field labels, links. Support different fonts, sizes, styles etc.
{{ :scripting:dialogs:paragraph.png?300|Paragraph control example}}
===== Properties =====
^ Property ^ Default Value ^ Description ^
| **id** | empty | id (name) of the script data object associated with control |
| **text** | empty | initial text of the control. Will be taken if no variable is bound (variable in dialog storage with name corresponding to //id// property) |
| **align** | stretched | [[scripting:dialogs:align|Alignment]] of the control |
| **style** | none | [[scripting:dialogs:paragraph#Styles|Styles]] of the paragraph control (can be combined) |
| **font** | dialog font | Font face to be applied |
| **size** | 8 | Size of the font, in logical units |
| **colour** | default text color | Colour of the text |
| **minwidth** | 0 | Minimum width, in characters, of the paragraph control |
===== Styles =====
^ Style ^ Description ^
| **normal** | Default mode |
| **bold** | Bold style |
| **italic** | Italic style |
| **underline** | Underline style |
| **strikethrough** | Strike-through style |
| **noprefix** | **&** symbols in text are not pre-processed to accelerator keys |
| **required** | Text ended with red asterisk symbol, to be used as label for required fields |
If text contains embedded link (href) no styles are applied and text rendered as normal (except of link)
===== Events =====
^ Event ^ Description ^
| **[[scripting:dialogs:events:onclick|onclick]]** | event handler (function name) to be called, if link in text will be clicked. If not defined, default handler will be called which will open the link target in web browser|
===== Example =====
var varStorage = new Storage();
var dialog_template =
'@@';
Output().writeln("Dialog 4 returns: " + dialog(dialog_template, varStorage));
function OnClick() {
alert("Control Text: " + this.Text + "\r\nControl Name: " + this.Name);
}