This is an old revision of the document!
Paragraph Control
Textview control for not editable descriptive text, field labels, links. Support different fonts, sizes, styles etc.
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 | Alignment of the control |
| style | none | 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)
Example
- paragraph.hejs
var varStorage = new Storage(); var dialog_template = '@<dialog title="Test Dialog" resizing="both"> \ <image sys_icon="information"/> \ <columnbreak/> \ <paragraph text="Hello, World! This is a really long paragraph in order to show button alignment is centered." align="left"/> \ <paragraph text="Testing the font" font="MS Shell Dlg 2" size="20" style="bold|underline" colour="#00FF00"/> \ <paragraph text="Link to <A HREF="http://www.hippoedit.com/">The Link</A>"/> \ <group minwidth="75" minheight="23" uniform="true" align="center"> \ <button title="&OK" default="true" returnval="ok"/> \ <button title="&Cancel" returnval="cancel"/> \ </group> \ </dialog>@'; Output().writeln("Dialog 4 returns: " + dialog(dialog_template, varStorage));