scripting:dialogs:paragraph

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scripting:dialogs:paragraph [2015/03/12 15:54] – [Properties] adminscripting:dialogs:paragraph [2018/01/10 20:41] (current) – external edit 127.0.0.1
Line 11: Line 11:
 | **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) |   | **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 |   | **align**    | stretched | [[scripting:dialogs:align|Alignment]] of the control |  
-| **style**    | none | [[scripting:dialogs:edit#Styles|Styles]] of the edit control (can be combined) |   +| **style**    | none | [[scripting:dialogs:paragraph#Styles|Styles]] of the paragraph control (can be combined) |   
-| **required**    | false required property of the control (if control is initial, "positive" buttons will be disabled) |   +| **font**    | dialog font Font face to be applied |   
-| **minwidth**    | Minimum width, in characters, of the edit box control |   +| **size**    | Size of the font, in logical units |   
-| **minheight**    | 0 | Minimum heights, in characters, of the edit box control. Only relevant for multiline edit box |  +| **colour**    | default text color | Colour of the text |   
 +| **minwidth**    | 0 | Minimum width, in characters, of the paragraph control |   
  
 ===== Styles ===== ===== Styles =====
 ^ Style     ^ Description    ^ ^ Style     ^ Description    ^
-| **none**    | Default mode |   +| **normal**    | Default mode |   
-| **password**    | Characters are hidden under asterisk symbols (used for password fields) |   +| **bold**    | Bold style |   
-| **lowercase**    | Characters are auto converted to lower case |   +| **italic**    | Italic style |   
-| **uppercase**    | Characters are auto converted to UPPER case |   +| **underline**    | Underline style |   
-| **number**    | Control allows only decimal digits (0-9) to be entered |   +| **strikethrough**    | Strike-through style |   
-| **readonly**    | Control is grayed and displayed text is not editable |   +| **noprefix**    | **&** symbols in text are not pre-processed to accelerator keys |   
-| **multiline**    | Editor allows to show multiline text (height may be controlled with //minheight// property) |   +| **required**    | Text ended with red asterisk symbol, to be used as label for required fields |   
-| **wantreturn**    | Editor accepts Enter keystroke for inserting new line |   + 
-| **wordwrap**    | Editor does a word wrap of lines, if it does not fit into control width and horizontal scrolling is disabled|   +<note>If text contains embedded link (hrefno styles are applied and text rendered as normal (except of link)</note> 
-| **vscroll**    | Control shows vertical scroll bar (in multiline mode only|   + 
-| **hscroll**    | Control shows horizontal scroll bar (in multiline mode only) |  +===== Events ===== 
 + 
 +^ Event     ^ Description    ^ 
 +| **[[scripting:dialogs:events:onclick|onclick]]**    | event handler (function nameto 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 ===== ===== Example =====
Line 40: Line 45:
    <paragraph text="Hello, World! This is a really long paragraph in order to show button alignment is centered." align="left"/> \    <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="Testing the font" font="MS Shell Dlg 2" size="20" style="bold|underline" colour="#00FF00"/> \
-   <paragraph text="Link to &lt;A HREF=&quot;http://www.hippoedit.com/&quot;&gt;The Link&lt;/A&gt;"/> \+   <paragraph text="Link to web site: &lt;A HREF=&quot;http://www.hippoedit.com/&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"> \    <group minwidth="75" minheight="23" uniform="true" align="center"> \
     <button title="&amp;OK" default="true" returnval="ok"/> \     <button title="&amp;OK" default="true" returnval="ok"/> \
Line 46: Line 52:
    </group> \    </group> \
 </dialog>@'; </dialog>@';
 +
 Output().writeln("Dialog 4 returns: " + dialog(dialog_template, varStorage)); Output().writeln("Dialog 4 returns: " + dialog(dialog_template, varStorage));
 +
 +function OnClick() {
 + alert("Control Text: " + this.Text + "\r\nControl Name: " + this.Name);
 +}
 </file> </file>