1<TITLE>messagedialog - Create and manipulate a message dialog widget</TITLE> 2<H1>messagedialog - Create and manipulate a message dialog widget</H1> 3 4</pre><H2>SYNOPSIS</H2> 5<B>messagedialog<I> <I>pathName </I>?<I>options</I>? 6</pre><H2>INHERITANCE</H2> 7itk::Toplevel <- Shell <- Dialogshell <- Dialog <- Messagedialog 8</pre><H2>STANDARD OPTIONS</H2> 9<P> 10<table cellpadding=5> 11<td valign=top> 12<B>background</B><br> 13<B>foreground</B><br> 14</td> 15<td valign=top> 16<B>bitmap</B><br> 17<B>image</B><br> 18</td> 19<td valign=top> 20<B>cursor</B><br> 21<B>text</B><br> 22</td> 23<td valign=top> 24<B>font</B><br> 25</td> 26</table> 27<P> 28See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options. 29</pre><H2>INHERITED OPTIONS</H2> 30<P> 31<table cellpadding=5> 32<td valign=top> 33<B>buttonBoxPadX</B><br> 34<B>padY</B><br> 35</td> 36<td valign=top> 37<B>buttonBoxPadY</B><br> 38<B>separator</B><br> 39</td> 40<td valign=top> 41<B>buttonBoxPos</B><br> 42<B>thickness</B><br> 43</td> 44<td valign=top> 45<B>padX</B><br> 46</td> 47</table> 48<P> 49See the <A HREF="dialogshell.n.html"> "dialogshell" </A> widget manual entry for details on the above 50inherited options. 51<P> 52<table cellpadding=5> 53<td valign=top> 54<B>master</B><br> 55</td> 56<td valign=top> 57<B>modality</B><br> 58</td> 59<td valign=top> 60</td> 61<td valign=top> 62</td> 63</table> 64<P> 65See the "shell" widget manual entry for details on the above 66inherited options. 67<P> 68<table cellpadding=5> 69<td valign=top> 70<B>title</B><br> 71</td> 72<td valign=top> 73</td> 74<td valign=top> 75</td> 76<td valign=top> 77</td> 78</table> 79<P> 80See the "Toplevel" widget manual entry for details on the above 81inherited options. 82<P> 83</pre><H2>WIDGET-SPECIFIC OPTIONS</H2> 84<P> 85<pre> 86Name: <B>imagePos</B> 87Class: <B>Position</B> 88Command-Line Switch: <B>-imagepos</B> 89</pre> 90<UL> 91Specifies the image position relative to the message text: <B>n</B>, <B>s</B>, 92<B>e</B>, or <B>w</B>. The default is w. 93</UL> 94<P> 95<pre> 96Name: <B>textPadX</B> 97Class: <B>Pad</B> 98Command-Line Switch: <B>-textpadx</B> 99</pre> 100<UL> 101Specifies a non-negative value indicating how much extra space to request for 102the message text in the X direction. The value may have any of the forms 103acceptable to Tk_GetPixels. 104</UL> 105<P> 106<pre> 107Name: <B>textPadY</B> 108Class: <B>Pad</B> 109Command-Line Switch: <B>-textpady</B> 110</pre> 111<UL> 112Specifies a non-negative value indicating how much extra space to request for 113the message text in the X direction. The value may have any of the forms 114acceptable to Tk_GetPixels. 115</UL> 116<P> 117</pre><HR> 118 119</pre><H2>DESCRIPTION</H2> 120<P> 121The <B>messagedialog</B> command creates a message dialog composite widget. 122The messagedialog is derived from the Dialog class and is composed of 123an image and associated message text with commands to manipulate the 124dialog buttons. 125 126</pre><H2>METHODS</H2> 127<P> 128The <B>messagedialog</B> command creates a new Tcl command whose 129name is <I>pathName</I>. This 130command may be used to invoke various 131operations on the widget. It has the following general form: 132<pre> 133<I>pathName option </I>?<I>arg arg ...</I>? 134</pre> 135<I>Option</I> and the <I>arg</I>s 136determine the exact behavior of the command. The following 137commands are possible for messagedialog widgets: 138 139</pre><H2>INHERITED METHODS</H2> 140<P> 141<table cellpadding=5> 142<td valign=top> 143<B>add</B><br> 144<B>insert</B><br> 145</td> 146<td valign=top> 147<B>buttonconfigure</B><br> 148<B>invoke</B><br> 149</td> 150<td valign=top> 151<B>default</B><br> 152<B>show</B><br> 153</td> 154<td valign=top> 155<B>hide</B><br> 156</td> 157</table> 158<P> 159See the <A HREF="buttonbox.n.html"> "buttonbox" </A> widget manual entry for details on the above 160inherited methods. 161<P> 162<table cellpadding=5> 163<td valign=top> 164<B>childsite</B><br> 165</td> 166<td valign=top> 167</td> 168<td valign=top> 169</td> 170<td valign=top> 171</td> 172</table> 173<P> 174See the <A HREF="dialogshell.n.html"> "dialogshell" </A> widget manual entry for details on the above 175inherited methods. 176<P> 177<table cellpadding=5> 178<td valign=top> 179<B>activate</B><br> 180</td> 181<td valign=top> 182<B>center</B><br> 183</td> 184<td valign=top> 185<B>deactivate</B><br> 186</td> 187<td valign=top> 188</td> 189</table> 190<P> 191See the <A HREF="dialogshell.n.html"> "dialogshell" </A> widget manual entry for details on the above 192inherited methods. 193</pre><H2>WIDGET-SPECIFIC METHODS</H2> 194<DL> 195<DT> <I>pathName <B>cget</B> <I>option</I> 196</I></B> 197<DD> Returns the current value of the configuration option given 198by <I>option</I>. 199<I>Option</I> may have any of the values accepted by the <B>messagedialog</B> 200command. 201</DL> 202<DL> 203<DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>? 204</I></B> 205<DD> Query or modify the configuration options of the widget. 206If no <I>option</I> is specified, returns a list describing all of 207the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for 208information on the format of this list). If <I>option</I> is specified 209with no <I>value</I>, then the command returns a list describing the 210one named option (this list will be identical to the corresponding 211sublist of the value returned if no <I>option</I> is specified). If 212one or more <I>option-value</I> pairs are specified, then the command 213modifies the given widget option(s) to have the given value(s); in 214this case the command returns an empty string. 215<I>Option</I> may have any of the values accepted by the <B>messagedialog</B> 216command. 217 218</DL> 219</pre><H2>COMPONENTS</H2> 220<P> 221<pre> 222Name: <B>image</B> 223Class: <B>Label</B> 224</pre> 225<UL> 226The image component is the bitmap or image of the message dialog. See 227the "label" widget manual entry for details on the image component item. 228</UL> 229<P> 230<pre> 231Name: <B>message</B> 232Class: <B>Label</B> 233</pre> 234<UL> 235The message component provides the textual portion of the message dialog. 236See the "label" widget manual entry for details on the message component item. 237</UL> 238</table> 239 240</pre><H2>EXAMPLE</H2> 241<pre> 242 # 243 # Standard question message dialog used for confirmation. 244 # 245 messagedialog .md -title "Message Dialog" -text "Are you sure ?" \\ 246 -bitmap questhead -modality global 247 248 .md buttonconfigure OK -text Yes 249 .md buttonconfigure Cancel -text No 250 251 if {[.md activate]} { 252 .md configure -text "Are you really sure ?" 253 if {[.md activate]} { 254 puts stdout "Yes" 255 } else { 256 puts stdout "No" 257 } 258 } else { 259 puts stdout "No" 260 } 261 262 destroy .md 263 264 # 265 # Copyright notice with automatic deactivation. 266 # 267 messagedialog .cr -title "Copyright" -bitmap @dsc.xbm -imagepos n \\ 268 -text "Copyright 1995 DSC Communications Corporation\\n \\ 269 All rights reserved" 270 271 .cr hide Cancel 272 273 .cr activate 274 after 10000 ".cr deactivate" 275</pre> 276</pre><H2>AUTHOR</H2> 277Mark L. Ulferts 278</pre><H2>KEYWORDS</H2> 279messagedialog, dialog, dialogshell, shell, widget 280