Terminal.Gui.MessageBox.html 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class MessageBox
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MessageBox
  11. ">
  12. <meta name="generator" content="docfx 2.59.0.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.MessageBox">
  73. <h1 id="Terminal_Gui_MessageBox" data-uid="Terminal.Gui.MessageBox" class="text-break">Class MessageBox
  74. </h1>
  75. <div class="markdown level0 summary">
  76. MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from.
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><span class="xref">System.Object</span></div>
  82. <div class="level1"><span class="xref">MessageBox</span></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <span class="xref">System.Object.Equals(System.Object)</span>
  88. </div>
  89. <div>
  90. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  91. </div>
  92. <div>
  93. <span class="xref">System.Object.GetHashCode()</span>
  94. </div>
  95. <div>
  96. <span class="xref">System.Object.GetType()</span>
  97. </div>
  98. <div>
  99. <span class="xref">System.Object.MemberwiseClone()</span>
  100. </div>
  101. <div>
  102. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  103. </div>
  104. <div>
  105. <span class="xref">System.Object.ToString()</span>
  106. </div>
  107. </div>
  108. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  109. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  110. <h5 id="Terminal_Gui_MessageBox_syntax">Syntax</h5>
  111. <div class="codewrapper">
  112. <pre><code class="lang-csharp hljs">public static class MessageBox</code></pre>
  113. </div>
  114. <h5 id="Terminal_Gui_MessageBox_examples"><strong>Examples</strong></h5>
  115. <pre><code>var n = MessageBox.Query (&quot;Quit Demo&quot;, &quot;Are you sure you want to quit this demo?&quot;, &quot;Yes&quot;, &quot;No&quot;);
  116. if (n == 0)
  117. quit = true;
  118. else
  119. quit = false;</code></pre>
  120. <h3 id="methods">Methods
  121. </h3>
  122. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  123. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring,NStack.ustring,NStack.ustring[])">ErrorQuery(ustring, ustring, ustring[])</h4>
  124. <div class="markdown level1 summary">
  125. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  126. </div>
  127. <div class="markdown level1 conceptual"></div>
  128. <h5 class="decalaration">Declaration</h5>
  129. <div class="codewrapper">
  130. <pre><code class="lang-csharp hljs">public static int ErrorQuery(ustring title, ustring message, params ustring[] buttons)</code></pre>
  131. </div>
  132. <h5 class="parameters">Parameters</h5>
  133. <table class="table table-bordered table-striped table-condensed">
  134. <thead>
  135. <tr>
  136. <th>Type</th>
  137. <th>Name</th>
  138. <th>Description</th>
  139. </tr>
  140. </thead>
  141. <tbody>
  142. <tr>
  143. <td><span class="xref">NStack.ustring</span></td>
  144. <td><span class="parametername">title</span></td>
  145. <td>Title for the query.</td>
  146. </tr>
  147. <tr>
  148. <td><span class="xref">NStack.ustring</span></td>
  149. <td><span class="parametername">message</span></td>
  150. <td>Message to display, might contain multiple lines.</td>
  151. </tr>
  152. <tr>
  153. <td><span class="xref">NStack.ustring</span>[]</td>
  154. <td><span class="parametername">buttons</span></td>
  155. <td>Array of buttons to add.</td>
  156. </tr>
  157. </tbody>
  158. </table>
  159. <h5 class="returns">Returns</h5>
  160. <table class="table table-bordered table-striped table-condensed">
  161. <thead>
  162. <tr>
  163. <th>Type</th>
  164. <th>Description</th>
  165. </tr>
  166. </thead>
  167. <tbody>
  168. <tr>
  169. <td><span class="xref">System.Int32</span></td>
  170. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  171. </tr>
  172. </tbody>
  173. </table>
  174. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  175. <div class="markdown level1 remarks">
  176. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  177. from the size of the title, message. and buttons.
  178. </div>
  179. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  180. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring,NStack.ustring,System.Int32,NStack.ustring[])">ErrorQuery(ustring, ustring, Int32, ustring[])</h4>
  181. <div class="markdown level1 summary">
  182. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  183. </div>
  184. <div class="markdown level1 conceptual"></div>
  185. <h5 class="decalaration">Declaration</h5>
  186. <div class="codewrapper">
  187. <pre><code class="lang-csharp hljs">public static int ErrorQuery(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  188. </div>
  189. <h5 class="parameters">Parameters</h5>
  190. <table class="table table-bordered table-striped table-condensed">
  191. <thead>
  192. <tr>
  193. <th>Type</th>
  194. <th>Name</th>
  195. <th>Description</th>
  196. </tr>
  197. </thead>
  198. <tbody>
  199. <tr>
  200. <td><span class="xref">NStack.ustring</span></td>
  201. <td><span class="parametername">title</span></td>
  202. <td>Title for the query.</td>
  203. </tr>
  204. <tr>
  205. <td><span class="xref">NStack.ustring</span></td>
  206. <td><span class="parametername">message</span></td>
  207. <td>Message to display, might contain multiple lines.</td>
  208. </tr>
  209. <tr>
  210. <td><span class="xref">System.Int32</span></td>
  211. <td><span class="parametername">defaultButton</span></td>
  212. <td>Index of the default button.</td>
  213. </tr>
  214. <tr>
  215. <td><span class="xref">NStack.ustring</span>[]</td>
  216. <td><span class="parametername">buttons</span></td>
  217. <td>Array of buttons to add.</td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. <h5 class="returns">Returns</h5>
  222. <table class="table table-bordered table-striped table-condensed">
  223. <thead>
  224. <tr>
  225. <th>Type</th>
  226. <th>Description</th>
  227. </tr>
  228. </thead>
  229. <tbody>
  230. <tr>
  231. <td><span class="xref">System.Int32</span></td>
  232. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  233. </tr>
  234. </tbody>
  235. </table>
  236. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  237. <div class="markdown level1 remarks">
  238. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  239. from the size of the title, message. and buttons.
  240. </div>
  241. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  242. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring,NStack.ustring,System.Int32,Terminal.Gui.Border,NStack.ustring[])">ErrorQuery(ustring, ustring, Int32, Border, ustring[])</h4>
  243. <div class="markdown level1 summary">
  244. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  245. </div>
  246. <div class="markdown level1 conceptual"></div>
  247. <h5 class="decalaration">Declaration</h5>
  248. <div class="codewrapper">
  249. <pre><code class="lang-csharp hljs">public static int ErrorQuery(ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)</code></pre>
  250. </div>
  251. <h5 class="parameters">Parameters</h5>
  252. <table class="table table-bordered table-striped table-condensed">
  253. <thead>
  254. <tr>
  255. <th>Type</th>
  256. <th>Name</th>
  257. <th>Description</th>
  258. </tr>
  259. </thead>
  260. <tbody>
  261. <tr>
  262. <td><span class="xref">NStack.ustring</span></td>
  263. <td><span class="parametername">title</span></td>
  264. <td>Title for the query.</td>
  265. </tr>
  266. <tr>
  267. <td><span class="xref">NStack.ustring</span></td>
  268. <td><span class="parametername">message</span></td>
  269. <td>Message to display, might contain multiple lines.</td>
  270. </tr>
  271. <tr>
  272. <td><span class="xref">System.Int32</span></td>
  273. <td><span class="parametername">defaultButton</span></td>
  274. <td>Index of the default button.</td>
  275. </tr>
  276. <tr>
  277. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  278. <td><span class="parametername">border</span></td>
  279. <td>The border settings.</td>
  280. </tr>
  281. <tr>
  282. <td><span class="xref">NStack.ustring</span>[]</td>
  283. <td><span class="parametername">buttons</span></td>
  284. <td>Array of buttons to add.</td>
  285. </tr>
  286. </tbody>
  287. </table>
  288. <h5 class="returns">Returns</h5>
  289. <table class="table table-bordered table-striped table-condensed">
  290. <thead>
  291. <tr>
  292. <th>Type</th>
  293. <th>Description</th>
  294. </tr>
  295. </thead>
  296. <tbody>
  297. <tr>
  298. <td><span class="xref">System.Int32</span></td>
  299. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  300. </tr>
  301. </tbody>
  302. </table>
  303. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  304. <div class="markdown level1 remarks">
  305. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  306. from the size of the title, message. and buttons.
  307. </div>
  308. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  309. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,NStack.ustring,NStack.ustring,NStack.ustring[])">ErrorQuery(Int32, Int32, ustring, ustring, ustring[])</h4>
  310. <div class="markdown level1 summary">
  311. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  312. </div>
  313. <div class="markdown level1 conceptual"></div>
  314. <h5 class="decalaration">Declaration</h5>
  315. <div class="codewrapper">
  316. <pre><code class="lang-csharp hljs">public static int ErrorQuery(int width, int height, ustring title, ustring message, params ustring[] buttons)</code></pre>
  317. </div>
  318. <h5 class="parameters">Parameters</h5>
  319. <table class="table table-bordered table-striped table-condensed">
  320. <thead>
  321. <tr>
  322. <th>Type</th>
  323. <th>Name</th>
  324. <th>Description</th>
  325. </tr>
  326. </thead>
  327. <tbody>
  328. <tr>
  329. <td><span class="xref">System.Int32</span></td>
  330. <td><span class="parametername">width</span></td>
  331. <td>Width for the window.</td>
  332. </tr>
  333. <tr>
  334. <td><span class="xref">System.Int32</span></td>
  335. <td><span class="parametername">height</span></td>
  336. <td>Height for the window.</td>
  337. </tr>
  338. <tr>
  339. <td><span class="xref">NStack.ustring</span></td>
  340. <td><span class="parametername">title</span></td>
  341. <td>Title for the query.</td>
  342. </tr>
  343. <tr>
  344. <td><span class="xref">NStack.ustring</span></td>
  345. <td><span class="parametername">message</span></td>
  346. <td>Message to display, might contain multiple lines.</td>
  347. </tr>
  348. <tr>
  349. <td><span class="xref">NStack.ustring</span>[]</td>
  350. <td><span class="parametername">buttons</span></td>
  351. <td>Array of buttons to add.</td>
  352. </tr>
  353. </tbody>
  354. </table>
  355. <h5 class="returns">Returns</h5>
  356. <table class="table table-bordered table-striped table-condensed">
  357. <thead>
  358. <tr>
  359. <th>Type</th>
  360. <th>Description</th>
  361. </tr>
  362. </thead>
  363. <tbody>
  364. <tr>
  365. <td><span class="xref">System.Int32</span></td>
  366. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  367. </tr>
  368. </tbody>
  369. </table>
  370. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  371. <div class="markdown level1 remarks">
  372. Use <a class="xref" href="Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring___">ErrorQuery(ustring, ustring, ustring[])</a> instead; it automatically sizes the MessageBox based on the contents.
  373. </div>
  374. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  375. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,NStack.ustring,NStack.ustring,System.Int32,NStack.ustring[])">ErrorQuery(Int32, Int32, ustring, ustring, Int32, ustring[])</h4>
  376. <div class="markdown level1 summary">
  377. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  378. </div>
  379. <div class="markdown level1 conceptual"></div>
  380. <h5 class="decalaration">Declaration</h5>
  381. <div class="codewrapper">
  382. <pre><code class="lang-csharp hljs">public static int ErrorQuery(int width, int height, ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  383. </div>
  384. <h5 class="parameters">Parameters</h5>
  385. <table class="table table-bordered table-striped table-condensed">
  386. <thead>
  387. <tr>
  388. <th>Type</th>
  389. <th>Name</th>
  390. <th>Description</th>
  391. </tr>
  392. </thead>
  393. <tbody>
  394. <tr>
  395. <td><span class="xref">System.Int32</span></td>
  396. <td><span class="parametername">width</span></td>
  397. <td>Width for the window.</td>
  398. </tr>
  399. <tr>
  400. <td><span class="xref">System.Int32</span></td>
  401. <td><span class="parametername">height</span></td>
  402. <td>Height for the window.</td>
  403. </tr>
  404. <tr>
  405. <td><span class="xref">NStack.ustring</span></td>
  406. <td><span class="parametername">title</span></td>
  407. <td>Title for the query.</td>
  408. </tr>
  409. <tr>
  410. <td><span class="xref">NStack.ustring</span></td>
  411. <td><span class="parametername">message</span></td>
  412. <td>Message to display, might contain multiple lines.</td>
  413. </tr>
  414. <tr>
  415. <td><span class="xref">System.Int32</span></td>
  416. <td><span class="parametername">defaultButton</span></td>
  417. <td>Index of the default button.</td>
  418. </tr>
  419. <tr>
  420. <td><span class="xref">NStack.ustring</span>[]</td>
  421. <td><span class="parametername">buttons</span></td>
  422. <td>Array of buttons to add.</td>
  423. </tr>
  424. </tbody>
  425. </table>
  426. <h5 class="returns">Returns</h5>
  427. <table class="table table-bordered table-striped table-condensed">
  428. <thead>
  429. <tr>
  430. <th>Type</th>
  431. <th>Description</th>
  432. </tr>
  433. </thead>
  434. <tbody>
  435. <tr>
  436. <td><span class="xref">System.Int32</span></td>
  437. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  438. </tr>
  439. </tbody>
  440. </table>
  441. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  442. <div class="markdown level1 remarks">
  443. Use <a class="xref" href="Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring___">ErrorQuery(ustring, ustring, ustring[])</a> instead; it automatically sizes the MessageBox based on the contents.
  444. </div>
  445. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  446. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,NStack.ustring,NStack.ustring,System.Int32,Terminal.Gui.Border,NStack.ustring[])">ErrorQuery(Int32, Int32, ustring, ustring, Int32, Border, ustring[])</h4>
  447. <div class="markdown level1 summary">
  448. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  449. </div>
  450. <div class="markdown level1 conceptual"></div>
  451. <h5 class="decalaration">Declaration</h5>
  452. <div class="codewrapper">
  453. <pre><code class="lang-csharp hljs">public static int ErrorQuery(int width, int height, ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)</code></pre>
  454. </div>
  455. <h5 class="parameters">Parameters</h5>
  456. <table class="table table-bordered table-striped table-condensed">
  457. <thead>
  458. <tr>
  459. <th>Type</th>
  460. <th>Name</th>
  461. <th>Description</th>
  462. </tr>
  463. </thead>
  464. <tbody>
  465. <tr>
  466. <td><span class="xref">System.Int32</span></td>
  467. <td><span class="parametername">width</span></td>
  468. <td>Width for the window.</td>
  469. </tr>
  470. <tr>
  471. <td><span class="xref">System.Int32</span></td>
  472. <td><span class="parametername">height</span></td>
  473. <td>Height for the window.</td>
  474. </tr>
  475. <tr>
  476. <td><span class="xref">NStack.ustring</span></td>
  477. <td><span class="parametername">title</span></td>
  478. <td>Title for the query.</td>
  479. </tr>
  480. <tr>
  481. <td><span class="xref">NStack.ustring</span></td>
  482. <td><span class="parametername">message</span></td>
  483. <td>Message to display, might contain multiple lines.</td>
  484. </tr>
  485. <tr>
  486. <td><span class="xref">System.Int32</span></td>
  487. <td><span class="parametername">defaultButton</span></td>
  488. <td>Index of the default button.</td>
  489. </tr>
  490. <tr>
  491. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  492. <td><span class="parametername">border</span></td>
  493. <td>The border settings.</td>
  494. </tr>
  495. <tr>
  496. <td><span class="xref">NStack.ustring</span>[]</td>
  497. <td><span class="parametername">buttons</span></td>
  498. <td>Array of buttons to add.</td>
  499. </tr>
  500. </tbody>
  501. </table>
  502. <h5 class="returns">Returns</h5>
  503. <table class="table table-bordered table-striped table-condensed">
  504. <thead>
  505. <tr>
  506. <th>Type</th>
  507. <th>Description</th>
  508. </tr>
  509. </thead>
  510. <tbody>
  511. <tr>
  512. <td><span class="xref">System.Int32</span></td>
  513. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  514. </tr>
  515. </tbody>
  516. </table>
  517. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  518. <div class="markdown level1 remarks">
  519. Use <a class="xref" href="Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring___">ErrorQuery(ustring, ustring, ustring[])</a> instead; it automatically sizes the MessageBox based on the contents.
  520. </div>
  521. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  522. <h4 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.Query(NStack.ustring,NStack.ustring,NStack.ustring[])">Query(ustring, ustring, ustring[])</h4>
  523. <div class="markdown level1 summary">
  524. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  525. </div>
  526. <div class="markdown level1 conceptual"></div>
  527. <h5 class="decalaration">Declaration</h5>
  528. <div class="codewrapper">
  529. <pre><code class="lang-csharp hljs">public static int Query(ustring title, ustring message, params ustring[] buttons)</code></pre>
  530. </div>
  531. <h5 class="parameters">Parameters</h5>
  532. <table class="table table-bordered table-striped table-condensed">
  533. <thead>
  534. <tr>
  535. <th>Type</th>
  536. <th>Name</th>
  537. <th>Description</th>
  538. </tr>
  539. </thead>
  540. <tbody>
  541. <tr>
  542. <td><span class="xref">NStack.ustring</span></td>
  543. <td><span class="parametername">title</span></td>
  544. <td>Title for the query.</td>
  545. </tr>
  546. <tr>
  547. <td><span class="xref">NStack.ustring</span></td>
  548. <td><span class="parametername">message</span></td>
  549. <td>Message to display, might contain multiple lines.</td>
  550. </tr>
  551. <tr>
  552. <td><span class="xref">NStack.ustring</span>[]</td>
  553. <td><span class="parametername">buttons</span></td>
  554. <td>Array of buttons to add.</td>
  555. </tr>
  556. </tbody>
  557. </table>
  558. <h5 class="returns">Returns</h5>
  559. <table class="table table-bordered table-striped table-condensed">
  560. <thead>
  561. <tr>
  562. <th>Type</th>
  563. <th>Description</th>
  564. </tr>
  565. </thead>
  566. <tbody>
  567. <tr>
  568. <td><span class="xref">System.Int32</span></td>
  569. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  570. </tr>
  571. </tbody>
  572. </table>
  573. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  574. <div class="markdown level1 remarks">
  575. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  576. from the size of the message and buttons.
  577. </div>
  578. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  579. <h4 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.Query(NStack.ustring,NStack.ustring,System.Int32,NStack.ustring[])">Query(ustring, ustring, Int32, ustring[])</h4>
  580. <div class="markdown level1 summary">
  581. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  582. </div>
  583. <div class="markdown level1 conceptual"></div>
  584. <h5 class="decalaration">Declaration</h5>
  585. <div class="codewrapper">
  586. <pre><code class="lang-csharp hljs">public static int Query(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  587. </div>
  588. <h5 class="parameters">Parameters</h5>
  589. <table class="table table-bordered table-striped table-condensed">
  590. <thead>
  591. <tr>
  592. <th>Type</th>
  593. <th>Name</th>
  594. <th>Description</th>
  595. </tr>
  596. </thead>
  597. <tbody>
  598. <tr>
  599. <td><span class="xref">NStack.ustring</span></td>
  600. <td><span class="parametername">title</span></td>
  601. <td>Title for the query.</td>
  602. </tr>
  603. <tr>
  604. <td><span class="xref">NStack.ustring</span></td>
  605. <td><span class="parametername">message</span></td>
  606. <td>Message to display, might contain multiple lines.</td>
  607. </tr>
  608. <tr>
  609. <td><span class="xref">System.Int32</span></td>
  610. <td><span class="parametername">defaultButton</span></td>
  611. <td>Index of the default button.</td>
  612. </tr>
  613. <tr>
  614. <td><span class="xref">NStack.ustring</span>[]</td>
  615. <td><span class="parametername">buttons</span></td>
  616. <td>Array of buttons to add.</td>
  617. </tr>
  618. </tbody>
  619. </table>
  620. <h5 class="returns">Returns</h5>
  621. <table class="table table-bordered table-striped table-condensed">
  622. <thead>
  623. <tr>
  624. <th>Type</th>
  625. <th>Description</th>
  626. </tr>
  627. </thead>
  628. <tbody>
  629. <tr>
  630. <td><span class="xref">System.Int32</span></td>
  631. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  632. </tr>
  633. </tbody>
  634. </table>
  635. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  636. <div class="markdown level1 remarks">
  637. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  638. from the size of the message and buttons.
  639. </div>
  640. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  641. <h4 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.Query(NStack.ustring,NStack.ustring,System.Int32,Terminal.Gui.Border,NStack.ustring[])">Query(ustring, ustring, Int32, Border, ustring[])</h4>
  642. <div class="markdown level1 summary">
  643. Presents an error <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  644. </div>
  645. <div class="markdown level1 conceptual"></div>
  646. <h5 class="decalaration">Declaration</h5>
  647. <div class="codewrapper">
  648. <pre><code class="lang-csharp hljs">public static int Query(ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)</code></pre>
  649. </div>
  650. <h5 class="parameters">Parameters</h5>
  651. <table class="table table-bordered table-striped table-condensed">
  652. <thead>
  653. <tr>
  654. <th>Type</th>
  655. <th>Name</th>
  656. <th>Description</th>
  657. </tr>
  658. </thead>
  659. <tbody>
  660. <tr>
  661. <td><span class="xref">NStack.ustring</span></td>
  662. <td><span class="parametername">title</span></td>
  663. <td>Title for the query.</td>
  664. </tr>
  665. <tr>
  666. <td><span class="xref">NStack.ustring</span></td>
  667. <td><span class="parametername">message</span></td>
  668. <td>Message to display, might contain multiple lines.</td>
  669. </tr>
  670. <tr>
  671. <td><span class="xref">System.Int32</span></td>
  672. <td><span class="parametername">defaultButton</span></td>
  673. <td>Index of the default button.</td>
  674. </tr>
  675. <tr>
  676. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  677. <td><span class="parametername">border</span></td>
  678. <td>The border settings.</td>
  679. </tr>
  680. <tr>
  681. <td><span class="xref">NStack.ustring</span>[]</td>
  682. <td><span class="parametername">buttons</span></td>
  683. <td>Array of buttons to add.</td>
  684. </tr>
  685. </tbody>
  686. </table>
  687. <h5 class="returns">Returns</h5>
  688. <table class="table table-bordered table-striped table-condensed">
  689. <thead>
  690. <tr>
  691. <th>Type</th>
  692. <th>Description</th>
  693. </tr>
  694. </thead>
  695. <tbody>
  696. <tr>
  697. <td><span class="xref">System.Int32</span></td>
  698. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  699. </tr>
  700. </tbody>
  701. </table>
  702. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  703. <div class="markdown level1 remarks">
  704. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  705. from the size of the message and buttons.
  706. </div>
  707. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  708. <h4 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,NStack.ustring,NStack.ustring,NStack.ustring[])">Query(Int32, Int32, ustring, ustring, ustring[])</h4>
  709. <div class="markdown level1 summary">
  710. Presents a normal <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  711. </div>
  712. <div class="markdown level1 conceptual"></div>
  713. <h5 class="decalaration">Declaration</h5>
  714. <div class="codewrapper">
  715. <pre><code class="lang-csharp hljs">public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons)</code></pre>
  716. </div>
  717. <h5 class="parameters">Parameters</h5>
  718. <table class="table table-bordered table-striped table-condensed">
  719. <thead>
  720. <tr>
  721. <th>Type</th>
  722. <th>Name</th>
  723. <th>Description</th>
  724. </tr>
  725. </thead>
  726. <tbody>
  727. <tr>
  728. <td><span class="xref">System.Int32</span></td>
  729. <td><span class="parametername">width</span></td>
  730. <td>Width for the window.</td>
  731. </tr>
  732. <tr>
  733. <td><span class="xref">System.Int32</span></td>
  734. <td><span class="parametername">height</span></td>
  735. <td>Height for the window.</td>
  736. </tr>
  737. <tr>
  738. <td><span class="xref">NStack.ustring</span></td>
  739. <td><span class="parametername">title</span></td>
  740. <td>Title for the query.</td>
  741. </tr>
  742. <tr>
  743. <td><span class="xref">NStack.ustring</span></td>
  744. <td><span class="parametername">message</span></td>
  745. <td>Message to display, might contain multiple lines.</td>
  746. </tr>
  747. <tr>
  748. <td><span class="xref">NStack.ustring</span>[]</td>
  749. <td><span class="parametername">buttons</span></td>
  750. <td>Array of buttons to add.</td>
  751. </tr>
  752. </tbody>
  753. </table>
  754. <h5 class="returns">Returns</h5>
  755. <table class="table table-bordered table-striped table-condensed">
  756. <thead>
  757. <tr>
  758. <th>Type</th>
  759. <th>Description</th>
  760. </tr>
  761. </thead>
  762. <tbody>
  763. <tr>
  764. <td><span class="xref">System.Int32</span></td>
  765. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  766. </tr>
  767. </tbody>
  768. </table>
  769. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  770. <div class="markdown level1 remarks">
  771. Use <a class="xref" href="Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring___">Query(ustring, ustring, ustring[])</a> instead; it automatically sizes the MessageBox based on the contents.
  772. </div>
  773. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  774. <h4 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,NStack.ustring,NStack.ustring,System.Int32,NStack.ustring[])">Query(Int32, Int32, ustring, ustring, Int32, ustring[])</h4>
  775. <div class="markdown level1 summary">
  776. Presents a normal <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  777. </div>
  778. <div class="markdown level1 conceptual"></div>
  779. <h5 class="decalaration">Declaration</h5>
  780. <div class="codewrapper">
  781. <pre><code class="lang-csharp hljs">public static int Query(int width, int height, ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  782. </div>
  783. <h5 class="parameters">Parameters</h5>
  784. <table class="table table-bordered table-striped table-condensed">
  785. <thead>
  786. <tr>
  787. <th>Type</th>
  788. <th>Name</th>
  789. <th>Description</th>
  790. </tr>
  791. </thead>
  792. <tbody>
  793. <tr>
  794. <td><span class="xref">System.Int32</span></td>
  795. <td><span class="parametername">width</span></td>
  796. <td>Width for the window.</td>
  797. </tr>
  798. <tr>
  799. <td><span class="xref">System.Int32</span></td>
  800. <td><span class="parametername">height</span></td>
  801. <td>Height for the window.</td>
  802. </tr>
  803. <tr>
  804. <td><span class="xref">NStack.ustring</span></td>
  805. <td><span class="parametername">title</span></td>
  806. <td>Title for the query.</td>
  807. </tr>
  808. <tr>
  809. <td><span class="xref">NStack.ustring</span></td>
  810. <td><span class="parametername">message</span></td>
  811. <td>Message to display, might contain multiple lines.</td>
  812. </tr>
  813. <tr>
  814. <td><span class="xref">System.Int32</span></td>
  815. <td><span class="parametername">defaultButton</span></td>
  816. <td>Index of the default button.</td>
  817. </tr>
  818. <tr>
  819. <td><span class="xref">NStack.ustring</span>[]</td>
  820. <td><span class="parametername">buttons</span></td>
  821. <td>Array of buttons to add.</td>
  822. </tr>
  823. </tbody>
  824. </table>
  825. <h5 class="returns">Returns</h5>
  826. <table class="table table-bordered table-striped table-condensed">
  827. <thead>
  828. <tr>
  829. <th>Type</th>
  830. <th>Description</th>
  831. </tr>
  832. </thead>
  833. <tbody>
  834. <tr>
  835. <td><span class="xref">System.Int32</span></td>
  836. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  837. </tr>
  838. </tbody>
  839. </table>
  840. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  841. <div class="markdown level1 remarks">
  842. Use <a class="xref" href="Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring___">Query(ustring, ustring, ustring[])</a> instead; it automatically sizes the MessageBox based on the contents.
  843. </div>
  844. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  845. <h4 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring___" data-uid="Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,NStack.ustring,NStack.ustring,System.Int32,Terminal.Gui.Border,NStack.ustring[])">Query(Int32, Int32, ustring, ustring, Int32, Border, ustring[])</h4>
  846. <div class="markdown level1 summary">
  847. Presents a normal <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a> with the specified title and message and a list of buttons to show to the user.
  848. </div>
  849. <div class="markdown level1 conceptual"></div>
  850. <h5 class="decalaration">Declaration</h5>
  851. <div class="codewrapper">
  852. <pre><code class="lang-csharp hljs">public static int Query(int width, int height, ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)</code></pre>
  853. </div>
  854. <h5 class="parameters">Parameters</h5>
  855. <table class="table table-bordered table-striped table-condensed">
  856. <thead>
  857. <tr>
  858. <th>Type</th>
  859. <th>Name</th>
  860. <th>Description</th>
  861. </tr>
  862. </thead>
  863. <tbody>
  864. <tr>
  865. <td><span class="xref">System.Int32</span></td>
  866. <td><span class="parametername">width</span></td>
  867. <td>Width for the window.</td>
  868. </tr>
  869. <tr>
  870. <td><span class="xref">System.Int32</span></td>
  871. <td><span class="parametername">height</span></td>
  872. <td>Height for the window.</td>
  873. </tr>
  874. <tr>
  875. <td><span class="xref">NStack.ustring</span></td>
  876. <td><span class="parametername">title</span></td>
  877. <td>Title for the query.</td>
  878. </tr>
  879. <tr>
  880. <td><span class="xref">NStack.ustring</span></td>
  881. <td><span class="parametername">message</span></td>
  882. <td>Message to display, might contain multiple lines.</td>
  883. </tr>
  884. <tr>
  885. <td><span class="xref">System.Int32</span></td>
  886. <td><span class="parametername">defaultButton</span></td>
  887. <td>Index of the default button.</td>
  888. </tr>
  889. <tr>
  890. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  891. <td><span class="parametername">border</span></td>
  892. <td>The border settings.</td>
  893. </tr>
  894. <tr>
  895. <td><span class="xref">NStack.ustring</span>[]</td>
  896. <td><span class="parametername">buttons</span></td>
  897. <td>Array of buttons to add.</td>
  898. </tr>
  899. </tbody>
  900. </table>
  901. <h5 class="returns">Returns</h5>
  902. <table class="table table-bordered table-striped table-condensed">
  903. <thead>
  904. <tr>
  905. <th>Type</th>
  906. <th>Description</th>
  907. </tr>
  908. </thead>
  909. <tbody>
  910. <tr>
  911. <td><span class="xref">System.Int32</span></td>
  912. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  913. </tr>
  914. </tbody>
  915. </table>
  916. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  917. <div class="markdown level1 remarks">
  918. Use <a class="xref" href="Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring___">Query(ustring, ustring, ustring[])</a> instead; it automatically sizes the MessageBox based on the contents.
  919. </div>
  920. </article>
  921. </div>
  922. <div class="hidden-sm col-md-2" role="complementary">
  923. <div class="sideaffix">
  924. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  925. <h5>In This Article</h5>
  926. <div></div>
  927. </nav>
  928. </div>
  929. </div>
  930. </div>
  931. </div>
  932. <footer>
  933. <div class="grad-bottom"></div>
  934. <div class="footer">
  935. <div class="container">
  936. <span class="pull-right">
  937. <a href="#top">Back to top</a>
  938. </span>
  939. <span>Generated by <strong>DocFX</strong></span>
  940. </div>
  941. </div>
  942. </footer>
  943. </div>
  944. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  945. <script type="text/javascript" src="../../styles/docfx.js"></script>
  946. <script type="text/javascript" src="../../styles/main.js"></script>
  947. </body>
  948. </html>