Latest revision |
Your text |
Line 1: |
Line 1: |
− | __NOTOC__{{mirc title|Dialog Components}} | + | __NOTOC__ |
| + | {{mIRC Guide}} |
| '''Dialog Components''' are individual [[Dialogs - mIRC|dialog]] elements that can be added onto the main dialog window. Below is a list of all the natively provided dialog components in [[mIRC]]. | | '''Dialog Components''' are individual [[Dialogs - mIRC|dialog]] elements that can be added onto the main dialog window. Below is a list of all the natively provided dialog components in [[mIRC]]. |
| | | |
Line 10: |
Line 11: |
| | [[File:MIRCdlgButton_n.png|link=#Button|center|135px]] | | | [[File:MIRCdlgButton_n.png|link=#Button|center|135px]] |
| || [[File:MIRCdlgCheck_n.png|link=#Check|center|135px]] | | || [[File:MIRCdlgCheck_n.png|link=#Check|center|135px]] |
− | || [[File:MIRCdlgToggle_n.png|link=#Check|center|135px]] | + | || [[File:MIRCdlgToggle_n.png|link=#Toggle_Button|center|135px]] |
| || [[File:MIRCdlgLabel_n.png|link=#Text|center|135px]] | | || [[File:MIRCdlgLabel_n.png|link=#Text|center|135px]] |
| |- style="color: rgba(0,0,0,.65);" | | |- style="color: rgba(0,0,0,.65);" |
− | ! Group Box !! Icon !! Edit !! Scroll | + | ! Group !! Icon !! Edit !! Scroll |
| |- | | |- |
− | | [[File:MIRCdlgGroup_n.png|link=#Group_Box|center|135px]] | + | | [[File:MIRCdlgGroup_n.png|link=#Group|center|135px]] |
| || [[File:MIRCdlgImage_n.png|link=#Icon|center|135px]] | | || [[File:MIRCdlgImage_n.png|link=#Icon|center|135px]] |
| || [[File:MIRCdlgText_n.png|link=#Edit|center|135px]] | | || [[File:MIRCdlgText_n.png|link=#Edit|center|135px]] |
Line 62: |
Line 63: |
| |} | | |} |
| | | |
− | ==== /did ====
| + | === /did === |
| | | |
− | * -f - sets focus on the button | + | * -f - set focus on the button |
− | * -t - sets the button as the default button | + | * -t - set the button as the default button |
− | * -e - enables the button | + | * -e - enable the button |
− | * -b - disables the button | + | * -b - disable the button |
− | * -v - makes the button visible | + | * -v - make the button visible |
− | * -h - hides the button | + | * -h - hide the button |
− | * -r - clears the button's text (caption) | + | * -r - clear the button's text (caption) |
| * -a - Adds to the button's text (caption) | | * -a - Adds to the button's text (caption) |
| | | |
Line 152: |
Line 153: |
| * -h - hides the checkbox | | * -h - hides the checkbox |
| * -c - mark the checkbox as checked | | * -c - mark the checkbox as checked |
− | * -u - mark the checkbox as unchecked, if you use -cu, it marks a 3dstate checkbox as indeterminate. | + | * -u - mark the checkbox as unchecked, if you use -cu, it mark a 3dstate checkbox as indeterminate. |
| * -r - clear the text of the checkbox (caption) | | * -r - clear the text of the checkbox (caption) |
| * -a - adds text to the text of the checkbox (caption) | | * -a - adds text to the text of the checkbox (caption) |
Line 166: |
Line 167: |
| * .text - returns the text (caption) of the checkbox line or Nth line | | * .text - returns the text (caption) of the checkbox line or Nth line |
| * .len - returns the length of the text of the checkbox (caption) | | * .len - returns the length of the text of the checkbox (caption) |
| + | * .sel - returns line number of Nth selected line |
| * .state - returns the state of the checkboxes, 0 = unchecked, 1 = checked, 2 = indeterminate (for 3stage checkboxes) | | * .state - returns the state of the checkboxes, 0 = unchecked, 1 = checked, 2 = indeterminate (for 3stage checkboxes) |
| * .next - returns the id of the next control in order of tab keypress | | * .next - returns the id of the next control in order of tab keypress |
Line 255: |
Line 257: |
| * .next - returns the id of the next control in order of tab keypress | | * .next - returns the id of the next control in order of tab keypress |
| * .prev - returns the id of the previous control in order of tab keypress | | * .prev - returns the id of the previous control in order of tab keypress |
− | * .visible - returns $true if the text control is visible, otherwise $false | + | * .visible - returns $true if the button is visible, otherwise $false |
− | * .enabled - returns $true if the text control is enabled, otherwise $false | + | * .enabled - returns $true if the button is enabled, otherwise $false |
| | | |
| === Events === | | === Events === |
Line 284: |
Line 286: |
| | | |
| | | |
− | == Group Box == | + | == Group == |
| This is a static control with a group box frame and an optional title that shows up at the top of the frame. | | This is a static control with a group box frame and an optional title that shows up at the top of the frame. |
− |
| |
− | '''Note:''' This only displays the group box but does not actually group the controls that you position within it.
| |
− | If you want to e.g. enable / disable them together, you need to do that programmatically.
| |
| | | |
| === Synopsis === | | === Synopsis === |
Line 298: |
Line 297: |
| ! Style !! Description | | ! Style !! Description |
| |- | | |- |
− | | disable || Disables the group box. | + | | disable || Disables the group. |
| |- | | |- |
− | | hide || Makes the group box invisible. | + | | hide || Makes the group invisible. |
| |- | | |- |
| | result || In modal mode, returns the text of the button. | | | result || In modal mode, returns the text of the button. |
− | |-
| |
− | | left || Put the title on the left
| |
− | |-
| |
− | | center || Put the title in the center
| |
− | |-
| |
− | | right || Put the title on the right
| |
− | |-
| |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - set focus on the box
| |
− | * -e - enable the box
| |
− | * -b - disable the box
| |
− | * -v - make the box visible
| |
− | * -h - hide the box
| |
− | * -r - clear the box's text (caption)
| |
− | * -a - Adds to the box's text (caption)
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, return the text (caption) of the box, same as the .text property
| |
− |
| |
− | Properties:
| |
− | * .text - returns the text of the box (caption)
| |
− | * .len - returns the length of the box's text (caption)
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the box is visible, otherwise $false
| |
− | * .enabled - returns $true if the box is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 358: |
Line 326: |
| == Icon == | | == Icon == |
| An icon control is a simple container that holds images and icons. | | An icon control is a simple container that holds images and icons. |
− |
| |
− | '''Note''': You cannot make an empty icon control, you must give a filename.
| |
| | | |
| === Synopsis === | | === Synopsis === |
Line 389: |
Line 355: |
| | actual || Use actual factor image size. | | | actual || Use actual factor image size. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the icon
| |
− | * -e - enables the button
| |
− | * -b - disables the button
| |
− | * -v - makes the button visible
| |
− | * -h - hides the button
| |
− | * -g - sets a new icon/bmp to an icon control, /did -g <name> <id> [n] <filename> where [n] is the optional index for the icon in the file
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)<.property>
| |
− |
| |
− | Properties:
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the icon is visible, otherwise $false
| |
− | * .enabled - returns $true if the icon is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 483: |
Line 430: |
| | limit N || Limits the text to N characters. | | | limit N || Limits the text to N characters. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - set focus on the editbox
| |
− | * -e - enable the editbox
| |
− | * -b - disable the editbox
| |
− | * -v - make the editbox visible
| |
− | * -h - hide the editbox
| |
− | * -r - clear the edit's text
| |
− | * -a - Adds to the editbox's text. You can use $crlf if the editbox has 'multi' style to add a newline.
| |
− | * -n - enables the editbox
| |
− | * -m - disables editbox
| |
− | * -c - sets the selected text in the editbox, /did -c <name> <id> <line> [[n [n2]], set the selection on line <line>, where n and n2 represent the start/end position of the selection in the line
| |
− | * -d - if you used the 'multi' style, deletes the Nth line in the editbox
| |
− | * -i - inserts the text on the Nth line of the editbox (if you are not using the 'multi' style, it overwrites everything)
| |
− | * -o - overwrite the Nth line (if you are not using the 'multi' style, it overwrite everything) in the editbox
| |
− | * -j - resets the edited setting of the editbox
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>,[N])[.property]
| |
− |
| |
− | Without any property, return the text (caption) of the editbox, same as the .text property
| |
− |
| |
− | Properties:
| |
− | * .text - returns the text of the editbox or the Nth line if the 'multi' style has been used (caption)
| |
− | * .len - returns the length of the editbox's text (caption)
| |
− | * .lines - returns the number of lines in the editbox
| |
− | * .sel - If N is non-zero, returns the line number of the starting position of selection
| |
− | * .seltext - returns the selected text in the editbox
| |
− | * .selstart - returns the position of the start of the selection in the editbox
| |
− | * .selend - returns the position of the end of the selection in the editbox
| |
− | * .edited - returns $true if the content of the editbox was changed
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the button is visible, otherwise $false
| |
− | * .enabled - returns $true if the button is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 542: |
Line 452: |
| option dbu | | option dbu |
| | | |
− | edit "Left", 1, 10 10 80 20, | + | edit "Lef", 1, 10 10 80 20, |
| edit "Center", 2, 10 40 80 20, center | | edit "Center", 2, 10 40 80 20, center |
| edit "Right", 3, 10 70 80 20, right | | edit "Right", 3, 10 70 80 20, right |
Line 574: |
Line 484: |
| | range || Sets the range of the scrollbar, Syntax: range <low> <high>. | | | range || Sets the range of the scrollbar, Syntax: range <low> <high>. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− | * '''-f''' - sets focus on the scrollbar
| |
− | * '''-e''' - enables the scrollbar
| |
− | * '''-b''' - disables the scrollbar
| |
− | * '''-v''' - makes the scrollbar visible
| |
− | * '''-h''' - hides the scrollbar
| |
− | * '''-z''' - Sets the range of the scrollbar, /did -z <name> <id> [n [n2]]
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)<.property>
| |
− |
| |
− | Properties:
| |
− | * .sel - returns the value of the current position of the scrollbar
| |
− | * .lines - returns the current maximum value used for the range
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the button is visible, otherwise $false
| |
− | * .enabled - returns $true if the button is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 626: |
Line 516: |
| | | |
| == Link == | | == Link == |
− | A link control, just like a label, is a static control with the additional behavior that, when you put your mouse over the control, the cursor because a little hand, indicating you can interact with that link, usually to open an URL. | + | A link control, just like a label, is a static control with the additional behavior that, when clicked, it opens the URL in the default web browser. |
− | | |
− | To make the link actually open the web page, you need to code an ON DIALOG SCLICK event.
| |
| | | |
| === Synopsis === | | === Synopsis === |
− | <pre>link "text", <id>, <x> <y> <width> <height>[, <style>]</pre> | + | <pre>link "<URL>", <id>, <x> <y> <width> <height>[, <style>]</pre> |
| | | |
| === Styles === | | === Styles === |
Line 644: |
Line 532: |
| | result || In modal mode, returns the URL. | | | result || In modal mode, returns the URL. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− | * '''-f''' - sets focus on the link control
| |
− | * '''-e''' - enables the link
| |
− | * '''-b''' - disables the link
| |
− | * '''-v''' - makes the link visible
| |
− | * '''-h''' - hides the link
| |
− | * '''-a''' - Adds text to the link's text (caption)
| |
− | * '''-r''' - Deletes the text (caption) of the link
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, return the text (caption) of the link, same as the .text property
| |
− |
| |
− | Properties:
| |
− | * .text - returns the text (caption) of the link control
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the button is visible, otherwise $false
| |
− | * .enabled - returns $true if the button is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 689: |
Line 555: |
| link "http://www.wikichip.org/", 1, 4 10 80 12 | | link "http://www.wikichip.org/", 1, 4 10 80 12 |
| button "Done", 4, 50 30 40 12, ok | | button "Done", 4, 50 30 40 12, ok |
− | } | + | }</source> |
− | ; click event
| |
− | on *:dialog:example:sclick:1: url -a $did(example,$did)</source>
| |
| <div style="display: block; text-align: center;">[[File:MIRCdlgLink Example.png]]</div> | | <div style="display: block; text-align: center;">[[File:MIRCdlgLink Example.png]]</div> |
| | | |
Line 714: |
Line 578: |
| | menu || Triggers upon menu click | | | menu || Triggers upon menu click |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− | * '''-e''' - enables the menu/item
| |
− | * '''-b''' - disables the menu/item
| |
− | * '''-v''' - makes the menu/item visible
| |
− | * '''-h''' - hides the menu/item
| |
− | * '''-a''' - Adds an item to a menu, /did -a <name> <menuid> <newid> <text>
| |
− | * '''-i''' - Inserts an item to a menu before the item identified by the specified <id>, /did -i <name> <id> <newid> <text>
| |
− | * '''-d''' - Deletes the item from the menu, /did -d <name> <id>
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | No $did support for a menu or an item.
| |
| | | |
| === Example === | | === Example === |
Line 782: |
Line 633: |
| |- | | |- |
| | result || In modal mode, returns the text of the button. | | | result || In modal mode, returns the text of the button. |
− | |-
| |
− | | group || Identifies the first radio button in a group of severals radio buttons, only one can be checked at a time.
| |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the radio
| |
− | * -t - sets the radio as the default control
| |
− | * -e - enables the radio
| |
− | * -b - disables the radio
| |
− | * -v - makes the radio visible
| |
− | * -h - hides the radio
| |
− | * -c - mark the radio as checked
| |
− | * -u - mark the checkboradio as unchecked
| |
− | * -r - clear the text of the radio (caption)
| |
− | * -a - adds text to the text of the radio (caption)
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, returns the text (caption) of the radio, same as the .text property
| |
− |
| |
− | Properties:
| |
− |
| |
− | * .text - returns the text (caption) of the radio line or Nth line
| |
− | * .len - returns the length of the text of the radio (caption)
| |
− | * .state - returns the state of the radio, 0 = unchecked, 1 = checked
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the radio is visible, otherwise $false
| |
− | * .enabled - returns $true if the radio is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 858: |
Line 678: |
| == Tab == | | == Tab == |
| A tab control is a container component capable of holding all of the other components. A tab control can have multiple tabs, and each tab can store another set of controls. | | A tab control is a container component capable of holding all of the other components. A tab control can have multiple tabs, and each tab can store another set of controls. |
− |
| |
− | '''Note''': You cannot have more than one tab control per dialog with mIRC
| |
| | | |
| === Synopsis === | | === Synopsis === |
| <pre>tab "<text>", <id>, <x> <y> <width> <height>, <style> | | <pre>tab "<text>", <id>, <x> <y> <width> <height>, <style> |
| tab "<text>", <id>, <style></pre> | | tab "<text>", <id>, <style></pre> |
− |
| |
− | The first tab definition in the synopsis specifies the main tab control and its size, the other definition adds an item to the tab
| |
− |
| |
− | To add a control to a tab item, specify the "tab <id>" style for the control, where <id> is the id of that tab item
| |
| | | |
| === Styles === | | === Styles === |
Line 876: |
Line 690: |
| | disable || Disables all the controls inside the specified tab. | | | disable || Disables all the controls inside the specified tab. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the tab
| |
− | * -e - enables the tab
| |
− | * -b - disables the tab
| |
− | * -v - makes the tab visible
| |
− | * -h - hides the tab
| |
− | * -r - clears the text of the tab item (caption)
| |
− | * -a - adds to the text of the tab item (caption)
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, returns the text (caption) of the radio, same as the .text property
| |
− |
| |
− | Properties:
| |
− |
| |
− | * .text - returns the text (caption) of the tab item
| |
− | * .len - returns the length of the text of the tab item (caption)
| |
− | * .next - returns the id of the next control in order of tab keypress
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the tab is visible, otherwise $false
| |
− | * .enabled - returns $true if the tab is enabled, otherwise $false
| |
− |
| |
− | ==== $dialog ====
| |
− |
| |
− | You can use $dialog(<name>).tab to know which tab is currently selected, returns the Nth tab number
| |
| | | |
| === Events === | | === Events === |
Line 936: |
Line 721: |
| }</source> | | }</source> |
| <div style="display: block; text-align: center;">[[File:MIRCdlgTab Example.png]]</div> | | <div style="display: block; text-align: center;">[[File:MIRCdlgTab Example.png]]</div> |
| + | |
| | | |
| == List == | | == List == |
Line 954: |
Line 740: |
| | sort || Sorts the items in the list. | | | sort || Sorts the items in the list. |
| |- | | |- |
− | | multsel || Allows multiple items to be selected without holding the click/shift/control. | + | | multsel || Allows multiple items to be selected at once. |
| |- | | |- |
− | | extsel || Allows extra selection support, you can use the control/shift keys to keep the selection and click on different entry in the list. | + | | extsel || Allows extra selection support. |
| |- | | |- |
| | vsbar || Always show the vertical scrollbar. | | | vsbar || Always show the vertical scrollbar. |
Line 966: |
Line 752: |
| | radio || Turns the list into a list of radio items. | | | radio || Turns the list into a list of radio items. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the list
| |
− | * -e - enables the list
| |
− | * -b - disables the list
| |
− | * -v - makes the list visible
| |
− | * -h - hides the list
| |
− | * -c - selects the Nth line in the list: /did -c <name> <id> <line>
| |
− | * -u - unselects the Nth line in the list
| |
− | * -k - keeps the selection of others lines when selecting/unselecting
| |
− | * -s - if you used the 'check' or 'radio' style, mark the check/radio of the Nth line as checked
| |
− | * -l - if you used the 'check' or 'radio' style, mark the check/radio of the Nth line as unchecked
| |
− | * -r - clears the list
| |
− | * -a - adds a line to the end of the list
| |
− | * -d - deletes the Nth line in the list
| |
− | * -i - inserts a line at Nth line position in the list
| |
− | * -o - overwrites the Nth line with the next text in the list
| |
− | * -z - resets the width of the horizontal scrollbar in the list
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>,[N])[.property]
| |
− |
| |
− | Without any properties, returns the text of the Nth line in the list, same as the .text property.
| |
− |
| |
− | * .text - returns the Nth line in the list
| |
− | * .len - returns the length of the Nth line in the list
| |
− | * .lines - returns the number of lines in the list
| |
− | * .sel - returns the line number of the Nth line selected line in the list, if N = 0, returns the total number of selected line
| |
− | * .seltext - returns the first selected line in the list
| |
− | * .next - returns the id of the next control in tab key order
| |
− | * .prev - returns the id of the previous control in tab key order
| |
− | * .visible - returns $true if the list is visible, otherwise $false
| |
− | * .enabled - returns $true if the list is enabled, otherwise $false
| |
− | * .csel - if the 'radio' or 'check' style is used, returns the line number of the Nth checked line in the list, if N = 0, returns the total number of checked line
| |
− | * .cstate - if the 'radio' or 'check' style is used, returns the state of the check/radio control of the Nth line in the list 1 = checked, 0 = unchecked
| |
| | | |
| === Events === | | === Events === |
Line 1,072: |
Line 821: |
| | hsbar || Always show the horizontal scrollbar. | | | hsbar || Always show the horizontal scrollbar. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the combo
| |
− | * -e - enables the combo
| |
− | * -b - disables the combo
| |
− | * -v - makes the combo visible
| |
− | * -h - hides the combo
| |
− | * -c - selects the Nth line in the combo: /did -c <name> <id> <line>
| |
− | * -r - clears the combo, use N = 0 to clear the text of the editable editbox of the combo
| |
− | * -a - adds a line to the end of the combo, use N = 0 to add to the editable editbox of the combo
| |
− | * -d - deletes the Nth line in the combo
| |
− | * -i - inserts a line at Nth line position in the combo
| |
− | * -o - overwrites the Nth line with the next text in the combo
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>,[N])[.property]
| |
− |
| |
− | Without any properties, returns the text of the Nth line in the list, same as the .text property.
| |
− |
| |
− | * .text - returns the Nth line in the combo, use N = 0 to access the text of the editable editbox of the combo
| |
− | * .len - returns the length of the Nth line in the combo
| |
− | * .lines - returns the number of lines in the combo
| |
− | * .sel - returns the line number selected line in the combo
| |
− | * .seltext - returns the first selected line in the combo
| |
− | * .next - returns the id of the next control in tab key order
| |
− | * .prev - returns the id of the previous control in tab key order
| |
− | * .visible - returns $true if the list is visible, otherwise $false
| |
− | * .enabled - returns $true if the list is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 1,140: |
Line 859: |
| | | |
| | | |
− | [[Category:mIRC|dialog components]] | + | [[Category:mIRC]] |