From WikiChip
Editing mirc/dialog components
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | __NOTOC__{{ | + | __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=# | + | || [[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 | + | ! Group !! Icon !! Edit !! Scroll |
|- | |- | ||
− | | [[File:MIRCdlgGroup_n.png|link=# | + | | [[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 === | |
− | * -f - | + | * -f - set focus on the button |
− | * -t - | + | * -t - set the button as the default button |
− | * -e - | + | * -e - enable the button |
− | * -b - | + | * -b - disable the button |
− | * -v - | + | * -v - make the button visible |
− | * -h - | + | * -h - hide the button |
− | * -r - | + | * -r - clear the button's text (caption) |
* -a - Adds to the button's text (caption) | * -a - Adds to the button's text (caption) | ||
− | + | === $did === | |
$did(<name>,<id>)[.property] | $did(<name>,<id>)[.property] | ||
Line 128: | Line 129: | ||
! 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 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 | + | * -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 210: | Line 212: | ||
<div style="display: block; text-align: center;">[[File:MIRCdlgCheck Example.png]]</div> | <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. | ||
+ | |} | ||
+ | |||
+ | === 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 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> | ||
+ | <div style="display: block; text-align: center;">[[File:MIRCdlgToggle Example.png]]</div> | ||
== Text == | == Text == | ||
Line 234: | Line 294: | ||
| result|| In modal mode, returns the text of the label. | | result|| In modal mode, returns the text of the label. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 284: | Line 321: | ||
− | == Group | + | == 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. | ||
− | |||
− | |||
− | |||
=== Synopsis === | === Synopsis === | ||
Line 298: | Line 332: | ||
! Style !! Description | ! Style !! Description | ||
|- | |- | ||
− | | disable || Disables the group | + | | disable || Disables the group. |
|- | |- | ||
− | | hide || Makes the group | + | | 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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 358: | Line 361: | ||
== 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. | ||
− | |||
− | |||
=== Synopsis === | === Synopsis === | ||
Line 389: | Line 390: | ||
| actual || Use actual factor image size. | | actual || Use actual factor image size. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 483: | Line 465: | ||
| limit N || Limits the text to N characters. | | limit N || Limits the text to N characters. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 542: | Line 487: | ||
option dbu | option dbu | ||
− | edit " | + | 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 519: | ||
| range || Sets the range of the scrollbar, Syntax: range <low> <high>. | | range || Sets the range of the scrollbar, Syntax: range <low> <high>. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 626: | Line 551: | ||
== Link == | == Link == | ||
− | A link control, just like a label, is a static control with the additional behavior that, when | + | 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. |
− | |||
− | |||
=== Synopsis === | === Synopsis === | ||
− | <pre>link " | + | <pre>link "<URL>", <id>, <x> <y> <width> <height>[, <style>]</pre> |
=== Styles === | === Styles === | ||
Line 644: | Line 567: | ||
| result || In modal mode, returns the URL. | | result || In modal mode, returns the URL. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 689: | Line 590: | ||
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> |
− | |||
− | |||
<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 613: | ||
| menu || Triggers upon menu click | | menu || Triggers upon menu click | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Example === | === Example === | ||
Line 782: | Line 668: | ||
|- | |- | ||
| result || In modal mode, returns the text of the button. | | result || In modal mode, returns the text of the button. | ||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 858: | Line 713: | ||
== 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. | ||
− | |||
− | |||
=== 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> | ||
− | |||
− | |||
− | |||
− | |||
=== Styles === | === Styles === | ||
Line 876: | Line 725: | ||
| disable || Disables all the controls inside the specified tab. | | disable || Disables all the controls inside the specified tab. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 936: | Line 756: | ||
}</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 775: | ||
| sort || Sorts the items in the list. | | sort || Sorts the items in the list. | ||
|- | |- | ||
− | | multsel || Allows multiple items to be selected | + | | multsel || Allows multiple items to be selected at once. |
|- | |- | ||
− | | extsel || Allows extra selection support | + | | extsel || Allows extra selection support. |
|- | |- | ||
| vsbar || Always show the vertical scrollbar. | | vsbar || Always show the vertical scrollbar. | ||
Line 966: | Line 787: | ||
| radio || Turns the list into a list of radio items. | | radio || Turns the list into a list of radio items. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 1,072: | Line 856: | ||
| hsbar || Always show the horizontal scrollbar. | | hsbar || Always show the horizontal scrollbar. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Events === | === Events === | ||
Line 1,140: | Line 894: | ||
− | [[Category:mIRC | + | [[Category:mIRC]] |