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 128: | Line 128: | ||
! 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 210: | Line 210: | ||
<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 == |