File: 286.htm

package info (click to toggle)
eagle 4.16-5
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 36,508 kB
  • sloc: sh: 82; makefile: 32
file content (75 lines) | stat: -rw-r--r-- 2,733 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html>
<head>
<title>EAGLE Help: dlgMessageBox()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>dlgMessageBox()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Displays a message box.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>int dlgMessageBox(string Message[, <i>button_list</i>])</tt>
<p>
<dt>
<b>Returns</b>
<dd>
The <tt>dlgMessageBox</tt> function returns the index of the button the user has selected.<br>
The first button in <tt>button_list</tt> has index <tt>0</tt>.
<p>
<dt>
<b>Description</b>
<dd>
The <tt>dlgMessageBox</tt> function displays the given <tt>Message</tt> in a modal dialog and
waits until the user selects one of the buttons defined in <tt>button_list</tt>.
<p>
<tt>button_list</tt> is an optional list of comma separated strings, which defines the
set of buttons that will be displayed at the bottom of the message box.<br>
A maximum of three buttons can be defined.
If no <tt>button_list</tt> is given, it defaults to <tt>"OK"</tt>.
<p>
The first button in <tt>button_list</tt> will become the default button (which will be selected
if the user hits ENTER), and the last button in the list will become the "cancel button", which
is selected if the user hits ESCape or closes the message box. You can make a different
button the default button by starting its name with a <tt>'+'</tt>, and you can make
a different button the cancel button by starting its name with a <tt>'-'</tt>.
To start a button text with an actual <tt>'+'</tt> or <tt>'-'</tt> it has to be <a href=317.htm>escaped</a>.
<p>
If a button text contains an <tt>'&amp;'</tt>, the character following the ampersand
will become a hotkey, and when the user hits the corresponding key, that button will be selected.
To have an actual <tt>'&amp;'</tt> character in the text it has to be <a href=317.htm>escaped</a>.
<p>
The message box can be given an icon by setting the first character of <tt>Message</tt> to<br>
&nbsp;&nbsp;&nbsp;<tt>'<b>;</b>'</tt> - for an <i>Information</i><br>
&nbsp;&nbsp;&nbsp;<tt>'<b>!</b>'</tt> - for a <i>Warning</i><br>
&nbsp;&nbsp;&nbsp;<tt>'<b>:</b>'</tt> - for an <i>Error</i><br>
If, however, the <tt>Message</tt> shall begin with one of these characters, it has to be <a href=317.htm>escaped</a>.
<p>
</dl>
<b>See also</b> <a href=252.htm>status()</a>
<p>
<b>Example</b>
<pre>
if (dlgMessageBox("!Are you sure?", "&amp;Yes", "&amp;No") == 0) {
   // let's do it!
   }
</pre>

<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright &copy; 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>