| Both sides previous revision Previous revision Next revision | Previous revision |
| scripting:dialogs:paragraph [2015/03/12 17:29] – [Properties] admin | scripting:dialogs:paragraph [2018/01/10 20:41] (current) – external edit 127.0.0.1 |
|---|
| ===== 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 (href) no 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 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 ===== |
| <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 <A HREF="http://www.hippoedit.com/">The Link</A>"/> \ | <paragraph text="Link to web site: <A HREF="http://www.hippoedit.com/">The Link</A>"/> \ |
| | <paragraph text="Action link <a href="none">Click Me</a>" onclick="OnClick"/> \ |
| <group minwidth="75" minheight="23" uniform="true" align="center"> \ | <group minwidth="75" minheight="23" uniform="true" align="center"> \ |
| <button title="&OK" default="true" returnval="ok"/> \ | <button title="&OK" default="true" returnval="ok"/> \ |
| </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> |