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 17:29] – [Properties] adminscripting:dialogs:paragraph [2018/01/10 20:41] (current) – external edit 127.0.0.1
Line 20: Line 20:
 ===== 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 42: 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 48: 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>