Paragraph Control

Textview control for not editable descriptive text, field labels, links. Support different fonts, sizes, styles etc. Paragraph control example

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
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)
Event Description
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
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 web site: &lt;A HREF=&quot;;&gt;The Link&lt;/A&gt;"/> \
   <paragraph text="Action link &lt;a href=&quot;none&quot;&gt;Click Me&lt;/a&gt;" onclick="OnClick"/> \
   <group minwidth="75" minheight="23" uniform="true" align="center"> \
   		<button title="&amp;OK" default="true" returnval="ok"/> \
   		<button title="&amp;Cancel" returnval="cancel"/> \
   </group> \
Output().writeln("Dialog 4 returns: " + dialog(dialog_template, varStorage));
function OnClick() {
	alert("Control Text: " + this.Text + "\r\nControl Name: " + this.Name);