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:34] – [Styles] adminscripting:dialogs:paragraph [2018/01/10 20:41] (current) – external edit 127.0.0.1
Line 29: Line 29:
  
 <note>If text contains embedded link (href) no styles are applied and text rendered as normal (except of link)</note> <note>If text contains embedded link (href) no styles are applied and text rendered as normal (except of link)</note>
 +
 +===== 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 ===== ===== 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>