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]]. |
| | | |
| == Components == | | == Components == |
| {| class="wikitable" | | {| class="wikitable" |
− | {| border="0" cellpadding="0" cellspacing="25px" style="background: rgba(0,0,0,.01); border-radius: 6px; box-shadow: 0 0 7px rgba(0,0,0,.17); margin: 0 auto;" | + | {| border="0" cellpadding="5" cellspacing="0" width="680px" |
− | |- style="color: rgba(0,0,0,.65);"
| + | |- align="center" |
− | ! Button !! Check !! Toggle !! Text
| + | | Button || Check |
− | |-
| + | |- align="center" valign="top" |
− | | [[File:MIRCdlgButton_n.png|link=#Button|center|135px]]
| + | | [[File:MIRCdlgButton.png|Button|link=#Button]] || [[File:MIRCdlgCheck.png|Checkbox|link=#Check]] |
− | || [[File:MIRCdlgCheck_n.png|link=#Check|center|135px]]
| + | |- align="center" |
− | || [[File:MIRCdlgToggle_n.png|link=#Check|center|135px]]
| + | | Toggle Button || Label |
− | || [[File:MIRCdlgLabel_n.png|link=#Text|center|135px]]
| + | |- align="center" valign="top" |
− | |- style="color: rgba(0,0,0,.65);"
| + | | [[File:MIRCdlgToggle.png|Toggle button|link=#Toggle_Button]] || [[File:MIRCdlgLabel.png|Label|link=#Label]] |
− | ! Group Box !! Icon !! Edit !! Scroll
| + | |- align="center" |
− | |-
| + | | Group || Image |
− | | [[File:MIRCdlgGroup_n.png|link=#Group_Box|center|135px]]
| + | |- align="center" valign="top" |
− | || [[File:MIRCdlgImage_n.png|link=#Icon|center|135px]]
| + | | [[File:MIRCdlgGroup.png|Group box|link=#Group]] || [[File:MIRCdlgImage.png|Image|link=#Image]] |
− | || [[File:MIRCdlgText_n.png|link=#Edit|center|135px]]
| + | |- align="center" |
− | || [[File:MIRCdlgScroll_n.png|link=#Scroll|center|135px]]
| + | | Text || Scroll |
− | |- style="color: rgba(0,0,0,.65);"
| + | |- align="center" valign="top" |
− | ! Link !! Menu !! Radio !! Tab
| + | | [[File:MIRCdlgText.png|Text box|link=#Text]] || [[File:MIRCdlgScroll.png|Scroll bar|link=#Scroll]] |
− | |-
| + | |- align="center" |
− | | [[File:MIRCdlgLink_n1.png|link=#Link|center|135px]]
| + | | List || Combo |
− | || [[File:MIRCdlgMenu_n.png|link=#Menu|135px]]
| + | |- align="center" valign="top" |
− | || [[File:MIRCdlgRadio_n.png|link=#Radio|135px]]
| + | | [[File:MIRCdlgList.png|List box|link=#List]] || [[File:MIRCdlgCombo.png|Combo box|link=#Combo]] |
− | || [[File:MIRCdlgTab_n.png|link=#Tab|135px]]
| |
− | |- style="color: rgba(0,0,0,.65);"
| |
− | ! List !! Combo
| |
− | |-
| |
− | | [[File:MIRCdlgList_n.png|link=#List|center|135px]]
| |
− | || [[File:MIRCdlgCombo_n.png|link=#Combo|center|135px]]
| |
| |} | | |} |
− |
| |
| | | |
| == Button == | | == Button == |
Line 51: |
Line 45: |
| | cancel || Closes the dialog as if it was canceled – similar to clicking the X button. | | | cancel || Closes the dialog as if it was canceled – similar to clicking the X button. |
| |- | | |- |
− | | flat || Creates a flat button (that depends on the OS and the theme used). | + | | flag || Creates a flat button (that depends on the OS and the theme used). |
| |- | | |- |
| | multi || Allows the text in the button to wrap around to multiple lines. | | | multi || Allows the text in the button to wrap around to multiple lines. |
Line 61: |
Line 55: |
| | result|| In modal mode, returns the text of the button. | | | result|| In modal mode, returns the text of the button. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the button
| |
− | * -t - sets the button as the default button
| |
− | * -e - enables the button
| |
− | * -b - disables the button
| |
− | * -v - makes the button visible
| |
− | * -h - hides the button
| |
− | * -r - clears the button's text (caption)
| |
− | * -a - Adds to the button's text (caption)
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, return the text (caption) of the button, same as the .text property
| |
− |
| |
− | Properties:
| |
− | * .text - returns the text of the button (caption)
| |
− | * .len - returns the length of the button'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 button is visible, otherwise $false
| |
− | * .enabled - returns $true if the button is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 102: |
Line 71: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 50 | | size -1 -1 100 50 |
| option dbu | | option dbu |
Line 114: |
Line 83: |
| echo -a $did($dname, $did).text is clicked. | | echo -a $did($dname, $did).text is clicked. |
| }</source> | | }</source> |
− |
| |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgButton Example.png]]</div>
| |
| | | |
| == Check == | | == Check == |
Line 128: |
Line 95: |
| ! Style !! Description | | ! Style !! Description |
| |- | | |- |
− | | push || Toggle Button | + | | push || See Toggle Button |
| |- | | |- |
| | left || Places the text on the left side of the control. | | | left || Places the text on the left side of the control. |
Line 142: |
Line 109: |
| | result || In modal mode, returns the text of the check box. | | | result || In modal mode, returns the text of the check box. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− |
| |
− | * -f - sets focus on the checkbox
| |
− | * -t - sets the checkbox as the default control
| |
− | * -e - enables the checkbox
| |
− | * -b - disables the checkbox
| |
− | * -v - makes the checkbox visible
| |
− | * -h - hides the checkbox
| |
− | * -c - mark the checkbox as checked
| |
− | * -u - mark the checkbox as unchecked, if you use -cu, it marks a 3dstate checkbox as indeterminate.
| |
− | * -r - clear the text of the checkbox (caption)
| |
− | * -a - adds text to the text of the checkbox (caption)
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, returns the text (caption) of the checkbox, same as the .text property
| |
− |
| |
− | Properties:
| |
− |
| |
− | * .text - returns the text (caption) of the checkbox line or Nth line
| |
− | * .len - returns the length of the text of the checkbox (caption)
| |
− | * .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
| |
− | * .prev - returns the id of the previous control in order of tab keypress
| |
− | * .visible - returns $true if the checkbox is visible, otherwise $false
| |
− | * .enabled - returns $true if the checkbox is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 187: |
Line 125: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 50 | | size -1 -1 100 50 |
| option dbu | | option dbu |
Line 208: |
Line 146: |
| return $gettok(%s, $calc($did($dname, $did).state + 1), 32) | | return $gettok(%s, $calc($did($dname, $did).state + 1), 32) |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgCheck Example.png]]</div>
| |
| | | |
| + | == Toggle Button == |
| + | A toggle button is a specialized button control which has the ability to be selected in the form of a pressed button. Like a checkbox control it has a checked and an unchecked state. A toggle button cannot have a third state. |
| + | |
| + | === Synopsis === |
| + | <pre>check "<text>", <id>, <x> <y> <width> <height>, push[ <style>]</pre> |
| + | |
| + | === Styles === |
| + | {| class="wikitable" |
| + | |- |
| + | ! Style !! Description |
| + | |- |
| + | | multi || Allows the text in the button to wrap around to multiple lines. |
| + | |- |
| + | | disable || Disables the button. |
| + | |- |
| + | | hide || Makes the button invisible. |
| + | |- |
| + | | result || In modal mode, returns the text of the button. |
| + | |} |
| | | |
− | == Text == | + | === Events === |
− | A text is simply a [[GUI]] label component with text designed for displaying information with no user input. By default, the text will wrap to the next line if needed. | + | {| class="wikitable" |
| + | |- |
| + | ! Event !! Description |
| + | |- |
| + | | sclick || Triggers upon single click |
| + | |} |
| + | |
| + | === Example === |
| + | <source lang="mIRC">; init alias |
| + | alias example { |
| + | dialog -m example example |
| + | } |
| + | ; dialog structure |
| + | dialog Example { |
| + | title "ZigWap - Example" |
| + | size -1 -1 90 60 |
| + | option dbu |
| + | text "Type:", 1, 4 5 60 10 |
| + | check "Grayscale", 2, 20 4 30 10, push |
| + | text "R:", 3, 5 20 6 10 |
| + | edit "255", 4, 12 19 15 10 |
| + | text "Black:", 5, 30 20 15 10 |
| + | edit "100", 6, 45 19 15 10 |
| + | text "G:", 7, 5 32 6 10 |
| + | edit "255", 8, 12 31 15 10 |
| + | text "B:", 9, 5 44 6 10 |
| + | edit "255", 10, 12 43 15 10 |
| + | button "Done", 11, 40 40 40 12, ok |
| + | } |
| + | on *:dialog:example:init:0:{ |
| + | did -b example 5,6 |
| + | } |
| + | on *:dialog:example:sclick:2:{ |
| + | did $iif(!$did(2).state, -b, -e) example 5,6 |
| + | did $iif($did(2).state, -b, -e) example 3,4,7-10 |
| + | }</source> |
| + | |
| + | == Label == |
| + | A label is simply a [[GUI]] component with text designed for displaying information with no user input. By default, the text will wrap to the next line if needed. |
| | | |
| === Synopsis === | | === Synopsis === |
Line 222: |
Line 216: |
| ! Style !! Description | | ! Style !! Description |
| |- | | |- |
− | | nowrap || Prevents the text from wrapping. Any text that does not fit will simply be cut off. | + | | nowrap || Prevents the text from wrapping. Any text that doesn’t fit will simply be cut off. |
| |- | | |- |
| | center || Centers the text in the label. | | | center || Centers the text in the label. |
Line 234: |
Line 228: |
| | result|| In modal mode, returns the text of the label. | | | result|| In modal mode, returns the text of the label. |
| |} | | |} |
− |
| |
− | ==== /did ====
| |
− | * '''-f''' - sets focus on the text control
| |
− | * '''-e''' - enable the text control
| |
− | * '''-b''' - disable the text control
| |
− | * '''-v''' - make the text control visible
| |
− | * '''-h''' - hide the text control
| |
− | * '''-r''' - clears the text of the text control
| |
− | * '''-a''' - adds text to the text control
| |
− |
| |
− | ==== $did ====
| |
− |
| |
− | $did(<name>,<id>)[.property]
| |
− |
| |
− | Without any property, return the text (caption) of the text control, same as the .text property
| |
− |
| |
− | Properties:
| |
− | * .text - returns the text of the text control (caption)
| |
− | * .len - returns the length of the text of the text control (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 text control is visible, otherwise $false
| |
− | * .enabled - returns $true if the text control is enabled, otherwise $false
| |
| | | |
| === Events === | | === Events === |
Line 273: |
Line 244: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 70 | | size -1 -1 100 70 |
| option dbu | | option dbu |
Line 281: |
Line 252: |
| button "Done", 4, 50 30 40 12, ok | | button "Done", 4, 50 30 40 12, ok |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgLabel Example.png]]</div>
| |
− |
| |
| | | |
− | == 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 264: |
| ! 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 346: |
Line 281: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 90 120 | | size -1 -1 90 120 |
| option dbu | | option dbu |
Line 353: |
Line 288: |
| button "Done", 4, 40 100 40 12, ok | | button "Done", 4, 40 100 40 12, ok |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgGroup Example.png]]</div>
| |
| | | |
− | | + | == Image == |
− | == Icon == | + | An image 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 320: |
| | 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 434: |
Line 346: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 110 | | size -1 -1 100 110 |
| option dbu | | option dbu |
Line 442: |
Line 354: |
| button "Done", 7, 10 95 40 12, ok | | button "Done", 7, 10 95 40 12, ok |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgImage Example.png]]</div>
| |
| | | |
− | == Edit == | + | |
| + | == Text == |
| The edit control can behave as a normal text box as well as a rich text control. | | The edit control can behave as a normal text box as well as a rich text control. |
| | | |
Line 483: |
Line 395: |
| | 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 538: |
Line 413: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 110 | | size -1 -1 100 110 |
| 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 548: |
Line 423: |
| button "Done", 7, 10 95 40 12, ok | | button "Done", 7, 10 95 40 12, ok |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgText Example.png]]</div>
| |
− |
| |
| | | |
| == Scroll == | | == Scroll == |
Line 574: |
Line 447: |
| | 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 610: |
Line 463: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 90 65 | | size -1 -1 90 65 |
| option dbu | | option dbu |
Line 622: |
Line 475: |
| did -ra example 1 $did(example, 2).sel $+ % | | did -ra example 1 $did(example, 2).sel $+ % |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgScroll Example.png]]</div>
| |
− |
| |
− |
| |
− | == 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.
| |
− |
| |
− | To make the link actually open the web page, you need to code an ON DIALOG SCLICK event.
| |
− |
| |
− | === Synopsis ===
| |
− | <pre>link "text", <id>, <x> <y> <width> <height>[, <style>]</pre>
| |
− |
| |
− | === Styles ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Style !! Description
| |
− | |-
| |
− | | disable || Disables the link. (grays it out)
| |
− | |-
| |
− | | hide || Makes the link invisible.
| |
− | |-
| |
− | | 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 ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Event !! Description
| |
− | |-
| |
− | | sclick || Triggers upon single click
| |
− | |-
| |
− | | dclick || Triggers upon double click
| |
− | |}
| |
− |
| |
− | === Example ===
| |
− | <source lang="mIRC">; init alias
| |
− | alias example {
| |
− | dialog -m example example
| |
− | }
| |
− | ; dialog structure
| |
− | dialog Example {
| |
− | title "Example"
| |
− | size -1 -1 100 50
| |
− | option dbu
| |
− | link "http://www.wikichip.org/", 1, 4 10 80 12
| |
− | button "Done", 4, 50 30 40 12, ok
| |
− | }
| |
− | ; 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>
| |
− |
| |
− | == Menu ==
| |
− | A menu control that allows a hierarchical organization of elements called menu items.
| |
− |
| |
− | === Synopsis ===
| |
− | <pre>menu "<text>", <menuid> [, <menuid>]
| |
− | item "<text>", <id [, <menuid>]
| |
− | item break, <id [, <menuid>]</pre>
| |
− |
| |
− | '''Note:''' Menu items can nest under other menus by simply specifying their parent menu ID.
| |
− |
| |
− | === Styles ===
| |
− | This element has no available styles.
| |
− |
| |
− | === Events ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Event !! Description
| |
− | |-
| |
− | | 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 ===
| |
− | <source lang="mIRC">; init alias
| |
− | alias example {
| |
− | dialog -m example example
| |
− | }
| |
− | ; dialog structure
| |
− | dialog Example {
| |
− | title "Example"
| |
− | size -1 -1 100 110
| |
− | option dbu
| |
− |
| |
− | menu "&File", 1
| |
− | item "&New", 11, 1
| |
− | item "&Open...", 12, 1
| |
− | item "&Save", 13, 1
| |
− | item "Save &As...", 14, 1
| |
− | menu "&Edit", 2
| |
− | item "Some Item1", 21, 2
| |
− | item break, 22, 2
| |
− | item "Some Item2", 23, 2
| |
− | menu "&View", 3
| |
− | item "Some Item3", 31, 3
| |
− | item break, 32, 3
| |
− | item "Some Item4", 33, 3
| |
− | menu "&Help", 4
| |
− | item "Some Item5", 41, 4
| |
− | item break, 42, 4
| |
− | item "Some Item6", 43, 4
| |
− |
| |
− | button "Done", 7, 10 95 40 12, ok
| |
− | }</source>
| |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgMenu Example.png]]</div>
| |
− |
| |
− |
| |
− | == Radio ==
| |
− | Radio buttons are a group of controls that can be configured to only allow the user to choose one of a predefined set of options.
| |
− |
| |
− | === Synopsis ===
| |
− | <pre>radio "<text>", <id>, <x> <y> <width> <height>[, <style> [group]]</pre>
| |
− |
| |
− | === Styles ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Style !! Description
| |
− | |-
| |
− | | left || Places the text on the left side of the control.
| |
− | |-
| |
− | | push || Creates a radio button in the form of normal buttons.
| |
− | |-
| |
− | | disable || Disables the button.
| |
− | |-
| |
− | | hide || Makes the button invisible.
| |
− | |-
| |
− | | 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 ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Event !! Description
| |
− | |-
| |
− | | sclick || Triggers upon single click
| |
− | |}
| |
− |
| |
− | === Example ===
| |
− | <source lang="mIRC">; init alias
| |
− | alias example {
| |
− | dialog -m example example
| |
− | }
| |
− | ; dialog structure
| |
− | dialog Example {
| |
− | title "Example"
| |
− | size -1 -1 90 80
| |
− | option dbu
| |
− |
| |
− | ; 1st group
| |
− | text "Sex:", 1, 4 4 10 10
| |
− | radio "Male", 2, 4 13 20 10, group
| |
− | radio "Female", 3, 30 13 30 10
| |
− |
| |
− | ; 2nd group
| |
− | text "Marital Status:", 4, 4 25 50 10
| |
− | radio "Single", 5, 4 33 22 10, group left
| |
− | radio "Married", 6, 30 33 25 10, left
| |
− | radio "Other", 7, 60 33 22 10, left
| |
− |
| |
− | ; 3rd group
| |
− | text "Favorite Color:", 8, 4 45 50 10
| |
− | radio "Red", 9, 4 55 20 10, group push
| |
− | radio "Green", 10, 25 55 20 10, push
| |
− | radio "Blue", 11, 46 55 20 10, push
| |
− | radio "Other", 12, 67 55 20 10, push
| |
− | button "Done", 13, 40 68 40 12, ok
| |
− | }</source>
| |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgRadio Example.png]]</div>
| |
− |
| |
− |
| |
− | == 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.
| |
− |
| |
− | '''Note''': You cannot have more than one tab control per dialog with mIRC
| |
− |
| |
− | === Synopsis ===
| |
− | <pre>tab "<text>", <id>, <x> <y> <width> <height>, <style>
| |
− | 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 ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Style !! Description
| |
− | |-
| |
− | | 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 ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Event !! Description
| |
− | |-
| |
− | | sclick || Triggers upon single click
| |
− | |}
| |
− |
| |
− | === Example ===
| |
− | <source lang="mIRC">; init alias
| |
− | alias example {
| |
− | dialog -m example example
| |
− | }
| |
− | ; dialog structure
| |
− | dialog Example {
| |
− | title "Example"
| |
− | size -1 -1 100 110
| |
− | option dbu
| |
− |
| |
− | tab "Tab 1", 1, 10 10 80 80
| |
− | tab "Tab 2", 2
| |
− | tab "Tab 3", 3
| |
− |
| |
− | button "111", 4, 20 30 40 40, tab 1
| |
− | button "222", 5, 20 30 40 40, tab 2
| |
− | button "333", 6, 20 30 40 40, tab 3
| |
− |
| |
− | button "Done", 7, 10 95 40 12, ok
| |
− | }</source>
| |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgTab Example.png]]</div>
| |
| | | |
| == List == | | == List == |
Line 954: |
Line 493: |
| | 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 505: |
| | 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,023: |
Line 525: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 110 | | size -1 -1 100 110 |
| option dbu | | option dbu |
Line 1,044: |
Line 546: |
| did -a example 3 Item C | | did -a example 3 Item C |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgList Example.png]]</div>
| |
− |
| |
| | | |
| == Combo == | | == Combo == |
Line 1,072: |
Line 572: |
| | 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,120: |
Line 590: |
| ; dialog structure | | ; dialog structure |
| dialog Example { | | dialog Example { |
− | title "Example" | + | title "ZigWap - Example" |
| size -1 -1 100 110 | | size -1 -1 100 110 |
| option dbu | | option dbu |
Line 1,137: |
Line 607: |
| did -a example 2 Item C | | did -a example 2 Item C |
| }</source> | | }</source> |
− | <div style="display: block; text-align: center;">[[File:MIRCdlgCombo Example.png]]</div>
| |
− |
| |
| | | |
− | [[Category:mIRC|dialog components]] | + | [[Category:mIRC]] |