Terminal.Gui.MessageBox.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  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.3.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. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  85. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  86. <h5 id="Terminal_Gui_MessageBox_syntax">Syntax</h5>
  87. <div class="codewrapper">
  88. <pre><code class="lang-csharp hljs">public static class MessageBox : Object</code></pre>
  89. </div>
  90. <h5 id="Terminal_Gui_MessageBox_examples"><strong>Examples</strong></h5>
  91. <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;);
  92. if (n == 0)
  93. quit = true;
  94. else
  95. quit = false;</code></pre>
  96. <h3 id="properties">Properties
  97. </h3>
  98. <a id="Terminal_Gui_MessageBox_Clicked_" data-uid="Terminal.Gui.MessageBox.Clicked*"></a>
  99. <h4 id="Terminal_Gui_MessageBox_Clicked" data-uid="Terminal.Gui.MessageBox.Clicked">Clicked</h4>
  100. <div class="markdown level1 summary">
  101. The index of the selected button, or -1 if the user pressed ESC to close the dialog.
  102. This is useful for web based console where by default there is no SynchronizationContext or TaskScheduler.
  103. </div>
  104. <div class="markdown level1 conceptual"></div>
  105. <h5 class="decalaration">Declaration</h5>
  106. <div class="codewrapper">
  107. <pre><code class="lang-csharp hljs">public static int Clicked { get; }</code></pre>
  108. </div>
  109. <h5 class="propertyValue">Property Value</h5>
  110. <table class="table table-bordered table-striped table-condensed">
  111. <thead>
  112. <tr>
  113. <th>Type</th>
  114. <th>Description</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. <tr>
  119. <td><span class="xref">System.Int32</span></td>
  120. <td></td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <h3 id="methods">Methods
  125. </h3>
  126. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  127. <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>
  128. <div class="markdown level1 summary">
  129. 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.
  130. </div>
  131. <div class="markdown level1 conceptual"></div>
  132. <h5 class="decalaration">Declaration</h5>
  133. <div class="codewrapper">
  134. <pre><code class="lang-csharp hljs">public static int ErrorQuery(ustring title, ustring message, params ustring[] buttons)</code></pre>
  135. </div>
  136. <h5 class="parameters">Parameters</h5>
  137. <table class="table table-bordered table-striped table-condensed">
  138. <thead>
  139. <tr>
  140. <th>Type</th>
  141. <th>Name</th>
  142. <th>Description</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td><span class="xref">NStack.ustring</span></td>
  148. <td><span class="parametername">title</span></td>
  149. <td>Title for the query.</td>
  150. </tr>
  151. <tr>
  152. <td><span class="xref">NStack.ustring</span></td>
  153. <td><span class="parametername">message</span></td>
  154. <td>Message to display, might contain multiple lines.</td>
  155. </tr>
  156. <tr>
  157. <td><span class="xref">NStack.ustring</span>[]</td>
  158. <td><span class="parametername">buttons</span></td>
  159. <td>Array of buttons to add.</td>
  160. </tr>
  161. </tbody>
  162. </table>
  163. <h5 class="returns">Returns</h5>
  164. <table class="table table-bordered table-striped table-condensed">
  165. <thead>
  166. <tr>
  167. <th>Type</th>
  168. <th>Description</th>
  169. </tr>
  170. </thead>
  171. <tbody>
  172. <tr>
  173. <td><span class="xref">System.Int32</span></td>
  174. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  175. </tr>
  176. </tbody>
  177. </table>
  178. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  179. <div class="markdown level1 remarks">
  180. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  181. from the size of the title, message. and buttons.
  182. </div>
  183. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  184. <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>
  185. <div class="markdown level1 summary">
  186. 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.
  187. </div>
  188. <div class="markdown level1 conceptual"></div>
  189. <h5 class="decalaration">Declaration</h5>
  190. <div class="codewrapper">
  191. <pre><code class="lang-csharp hljs">public static int ErrorQuery(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  192. </div>
  193. <h5 class="parameters">Parameters</h5>
  194. <table class="table table-bordered table-striped table-condensed">
  195. <thead>
  196. <tr>
  197. <th>Type</th>
  198. <th>Name</th>
  199. <th>Description</th>
  200. </tr>
  201. </thead>
  202. <tbody>
  203. <tr>
  204. <td><span class="xref">NStack.ustring</span></td>
  205. <td><span class="parametername">title</span></td>
  206. <td>Title for the query.</td>
  207. </tr>
  208. <tr>
  209. <td><span class="xref">NStack.ustring</span></td>
  210. <td><span class="parametername">message</span></td>
  211. <td>Message to display, might contain multiple lines.</td>
  212. </tr>
  213. <tr>
  214. <td><span class="xref">System.Int32</span></td>
  215. <td><span class="parametername">defaultButton</span></td>
  216. <td>Index of the default button.</td>
  217. </tr>
  218. <tr>
  219. <td><span class="xref">NStack.ustring</span>[]</td>
  220. <td><span class="parametername">buttons</span></td>
  221. <td>Array of buttons to add.</td>
  222. </tr>
  223. </tbody>
  224. </table>
  225. <h5 class="returns">Returns</h5>
  226. <table class="table table-bordered table-striped table-condensed">
  227. <thead>
  228. <tr>
  229. <th>Type</th>
  230. <th>Description</th>
  231. </tr>
  232. </thead>
  233. <tbody>
  234. <tr>
  235. <td><span class="xref">System.Int32</span></td>
  236. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  237. </tr>
  238. </tbody>
  239. </table>
  240. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  241. <div class="markdown level1 remarks">
  242. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  243. from the size of the title, message. and buttons.
  244. </div>
  245. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  246. <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>
  247. <div class="markdown level1 summary">
  248. 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.
  249. </div>
  250. <div class="markdown level1 conceptual"></div>
  251. <h5 class="decalaration">Declaration</h5>
  252. <div class="codewrapper">
  253. <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>
  254. </div>
  255. <h5 class="parameters">Parameters</h5>
  256. <table class="table table-bordered table-striped table-condensed">
  257. <thead>
  258. <tr>
  259. <th>Type</th>
  260. <th>Name</th>
  261. <th>Description</th>
  262. </tr>
  263. </thead>
  264. <tbody>
  265. <tr>
  266. <td><span class="xref">NStack.ustring</span></td>
  267. <td><span class="parametername">title</span></td>
  268. <td>Title for the query.</td>
  269. </tr>
  270. <tr>
  271. <td><span class="xref">NStack.ustring</span></td>
  272. <td><span class="parametername">message</span></td>
  273. <td>Message to display, might contain multiple lines.</td>
  274. </tr>
  275. <tr>
  276. <td><span class="xref">System.Int32</span></td>
  277. <td><span class="parametername">defaultButton</span></td>
  278. <td>Index of the default button.</td>
  279. </tr>
  280. <tr>
  281. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  282. <td><span class="parametername">border</span></td>
  283. <td>The border settings.</td>
  284. </tr>
  285. <tr>
  286. <td><span class="xref">NStack.ustring</span>[]</td>
  287. <td><span class="parametername">buttons</span></td>
  288. <td>Array of buttons to add.</td>
  289. </tr>
  290. </tbody>
  291. </table>
  292. <h5 class="returns">Returns</h5>
  293. <table class="table table-bordered table-striped table-condensed">
  294. <thead>
  295. <tr>
  296. <th>Type</th>
  297. <th>Description</th>
  298. </tr>
  299. </thead>
  300. <tbody>
  301. <tr>
  302. <td><span class="xref">System.Int32</span></td>
  303. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  304. </tr>
  305. </tbody>
  306. </table>
  307. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  308. <div class="markdown level1 remarks">
  309. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  310. from the size of the title, message. and buttons.
  311. </div>
  312. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  313. <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>
  314. <div class="markdown level1 summary">
  315. 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.
  316. </div>
  317. <div class="markdown level1 conceptual"></div>
  318. <h5 class="decalaration">Declaration</h5>
  319. <div class="codewrapper">
  320. <pre><code class="lang-csharp hljs">public static int ErrorQuery(int width, int height, ustring title, ustring message, params ustring[] buttons)</code></pre>
  321. </div>
  322. <h5 class="parameters">Parameters</h5>
  323. <table class="table table-bordered table-striped table-condensed">
  324. <thead>
  325. <tr>
  326. <th>Type</th>
  327. <th>Name</th>
  328. <th>Description</th>
  329. </tr>
  330. </thead>
  331. <tbody>
  332. <tr>
  333. <td><span class="xref">System.Int32</span></td>
  334. <td><span class="parametername">width</span></td>
  335. <td>Width for the window.</td>
  336. </tr>
  337. <tr>
  338. <td><span class="xref">System.Int32</span></td>
  339. <td><span class="parametername">height</span></td>
  340. <td>Height for the window.</td>
  341. </tr>
  342. <tr>
  343. <td><span class="xref">NStack.ustring</span></td>
  344. <td><span class="parametername">title</span></td>
  345. <td>Title for the query.</td>
  346. </tr>
  347. <tr>
  348. <td><span class="xref">NStack.ustring</span></td>
  349. <td><span class="parametername">message</span></td>
  350. <td>Message to display, might contain multiple lines.</td>
  351. </tr>
  352. <tr>
  353. <td><span class="xref">NStack.ustring</span>[]</td>
  354. <td><span class="parametername">buttons</span></td>
  355. <td>Array of buttons to add.</td>
  356. </tr>
  357. </tbody>
  358. </table>
  359. <h5 class="returns">Returns</h5>
  360. <table class="table table-bordered table-striped table-condensed">
  361. <thead>
  362. <tr>
  363. <th>Type</th>
  364. <th>Description</th>
  365. </tr>
  366. </thead>
  367. <tbody>
  368. <tr>
  369. <td><span class="xref">System.Int32</span></td>
  370. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  371. </tr>
  372. </tbody>
  373. </table>
  374. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  375. <div class="markdown level1 remarks">
  376. 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.
  377. </div>
  378. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  379. <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>
  380. <div class="markdown level1 summary">
  381. 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.
  382. </div>
  383. <div class="markdown level1 conceptual"></div>
  384. <h5 class="decalaration">Declaration</h5>
  385. <div class="codewrapper">
  386. <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>
  387. </div>
  388. <h5 class="parameters">Parameters</h5>
  389. <table class="table table-bordered table-striped table-condensed">
  390. <thead>
  391. <tr>
  392. <th>Type</th>
  393. <th>Name</th>
  394. <th>Description</th>
  395. </tr>
  396. </thead>
  397. <tbody>
  398. <tr>
  399. <td><span class="xref">System.Int32</span></td>
  400. <td><span class="parametername">width</span></td>
  401. <td>Width for the window.</td>
  402. </tr>
  403. <tr>
  404. <td><span class="xref">System.Int32</span></td>
  405. <td><span class="parametername">height</span></td>
  406. <td>Height for the window.</td>
  407. </tr>
  408. <tr>
  409. <td><span class="xref">NStack.ustring</span></td>
  410. <td><span class="parametername">title</span></td>
  411. <td>Title for the query.</td>
  412. </tr>
  413. <tr>
  414. <td><span class="xref">NStack.ustring</span></td>
  415. <td><span class="parametername">message</span></td>
  416. <td>Message to display, might contain multiple lines.</td>
  417. </tr>
  418. <tr>
  419. <td><span class="xref">System.Int32</span></td>
  420. <td><span class="parametername">defaultButton</span></td>
  421. <td>Index of the default button.</td>
  422. </tr>
  423. <tr>
  424. <td><span class="xref">NStack.ustring</span>[]</td>
  425. <td><span class="parametername">buttons</span></td>
  426. <td>Array of buttons to add.</td>
  427. </tr>
  428. </tbody>
  429. </table>
  430. <h5 class="returns">Returns</h5>
  431. <table class="table table-bordered table-striped table-condensed">
  432. <thead>
  433. <tr>
  434. <th>Type</th>
  435. <th>Description</th>
  436. </tr>
  437. </thead>
  438. <tbody>
  439. <tr>
  440. <td><span class="xref">System.Int32</span></td>
  441. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  442. </tr>
  443. </tbody>
  444. </table>
  445. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  446. <div class="markdown level1 remarks">
  447. 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.
  448. </div>
  449. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  450. <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>
  451. <div class="markdown level1 summary">
  452. 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.
  453. </div>
  454. <div class="markdown level1 conceptual"></div>
  455. <h5 class="decalaration">Declaration</h5>
  456. <div class="codewrapper">
  457. <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>
  458. </div>
  459. <h5 class="parameters">Parameters</h5>
  460. <table class="table table-bordered table-striped table-condensed">
  461. <thead>
  462. <tr>
  463. <th>Type</th>
  464. <th>Name</th>
  465. <th>Description</th>
  466. </tr>
  467. </thead>
  468. <tbody>
  469. <tr>
  470. <td><span class="xref">System.Int32</span></td>
  471. <td><span class="parametername">width</span></td>
  472. <td>Width for the window.</td>
  473. </tr>
  474. <tr>
  475. <td><span class="xref">System.Int32</span></td>
  476. <td><span class="parametername">height</span></td>
  477. <td>Height for the window.</td>
  478. </tr>
  479. <tr>
  480. <td><span class="xref">NStack.ustring</span></td>
  481. <td><span class="parametername">title</span></td>
  482. <td>Title for the query.</td>
  483. </tr>
  484. <tr>
  485. <td><span class="xref">NStack.ustring</span></td>
  486. <td><span class="parametername">message</span></td>
  487. <td>Message to display, might contain multiple lines.</td>
  488. </tr>
  489. <tr>
  490. <td><span class="xref">System.Int32</span></td>
  491. <td><span class="parametername">defaultButton</span></td>
  492. <td>Index of the default button.</td>
  493. </tr>
  494. <tr>
  495. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  496. <td><span class="parametername">border</span></td>
  497. <td>The border settings.</td>
  498. </tr>
  499. <tr>
  500. <td><span class="xref">NStack.ustring</span>[]</td>
  501. <td><span class="parametername">buttons</span></td>
  502. <td>Array of buttons to add.</td>
  503. </tr>
  504. </tbody>
  505. </table>
  506. <h5 class="returns">Returns</h5>
  507. <table class="table table-bordered table-striped table-condensed">
  508. <thead>
  509. <tr>
  510. <th>Type</th>
  511. <th>Description</th>
  512. </tr>
  513. </thead>
  514. <tbody>
  515. <tr>
  516. <td><span class="xref">System.Int32</span></td>
  517. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  518. </tr>
  519. </tbody>
  520. </table>
  521. <h5 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  522. <div class="markdown level1 remarks">
  523. 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.
  524. </div>
  525. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  526. <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>
  527. <div class="markdown level1 summary">
  528. 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.
  529. </div>
  530. <div class="markdown level1 conceptual"></div>
  531. <h5 class="decalaration">Declaration</h5>
  532. <div class="codewrapper">
  533. <pre><code class="lang-csharp hljs">public static int Query(ustring title, ustring message, params ustring[] buttons)</code></pre>
  534. </div>
  535. <h5 class="parameters">Parameters</h5>
  536. <table class="table table-bordered table-striped table-condensed">
  537. <thead>
  538. <tr>
  539. <th>Type</th>
  540. <th>Name</th>
  541. <th>Description</th>
  542. </tr>
  543. </thead>
  544. <tbody>
  545. <tr>
  546. <td><span class="xref">NStack.ustring</span></td>
  547. <td><span class="parametername">title</span></td>
  548. <td>Title for the query.</td>
  549. </tr>
  550. <tr>
  551. <td><span class="xref">NStack.ustring</span></td>
  552. <td><span class="parametername">message</span></td>
  553. <td>Message to display, might contain multiple lines.</td>
  554. </tr>
  555. <tr>
  556. <td><span class="xref">NStack.ustring</span>[]</td>
  557. <td><span class="parametername">buttons</span></td>
  558. <td>Array of buttons to add.</td>
  559. </tr>
  560. </tbody>
  561. </table>
  562. <h5 class="returns">Returns</h5>
  563. <table class="table table-bordered table-striped table-condensed">
  564. <thead>
  565. <tr>
  566. <th>Type</th>
  567. <th>Description</th>
  568. </tr>
  569. </thead>
  570. <tbody>
  571. <tr>
  572. <td><span class="xref">System.Int32</span></td>
  573. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  574. </tr>
  575. </tbody>
  576. </table>
  577. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  578. <div class="markdown level1 remarks">
  579. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  580. from the size of the message and buttons.
  581. </div>
  582. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  583. <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>
  584. <div class="markdown level1 summary">
  585. 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.
  586. </div>
  587. <div class="markdown level1 conceptual"></div>
  588. <h5 class="decalaration">Declaration</h5>
  589. <div class="codewrapper">
  590. <pre><code class="lang-csharp hljs">public static int Query(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  591. </div>
  592. <h5 class="parameters">Parameters</h5>
  593. <table class="table table-bordered table-striped table-condensed">
  594. <thead>
  595. <tr>
  596. <th>Type</th>
  597. <th>Name</th>
  598. <th>Description</th>
  599. </tr>
  600. </thead>
  601. <tbody>
  602. <tr>
  603. <td><span class="xref">NStack.ustring</span></td>
  604. <td><span class="parametername">title</span></td>
  605. <td>Title for the query.</td>
  606. </tr>
  607. <tr>
  608. <td><span class="xref">NStack.ustring</span></td>
  609. <td><span class="parametername">message</span></td>
  610. <td>Message to display, might contain multiple lines.</td>
  611. </tr>
  612. <tr>
  613. <td><span class="xref">System.Int32</span></td>
  614. <td><span class="parametername">defaultButton</span></td>
  615. <td>Index of the default button.</td>
  616. </tr>
  617. <tr>
  618. <td><span class="xref">NStack.ustring</span>[]</td>
  619. <td><span class="parametername">buttons</span></td>
  620. <td>Array of buttons to add.</td>
  621. </tr>
  622. </tbody>
  623. </table>
  624. <h5 class="returns">Returns</h5>
  625. <table class="table table-bordered table-striped table-condensed">
  626. <thead>
  627. <tr>
  628. <th>Type</th>
  629. <th>Description</th>
  630. </tr>
  631. </thead>
  632. <tbody>
  633. <tr>
  634. <td><span class="xref">System.Int32</span></td>
  635. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  636. </tr>
  637. </tbody>
  638. </table>
  639. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  640. <div class="markdown level1 remarks">
  641. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  642. from the size of the message and buttons.
  643. </div>
  644. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  645. <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>
  646. <div class="markdown level1 summary">
  647. 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.
  648. </div>
  649. <div class="markdown level1 conceptual"></div>
  650. <h5 class="decalaration">Declaration</h5>
  651. <div class="codewrapper">
  652. <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>
  653. </div>
  654. <h5 class="parameters">Parameters</h5>
  655. <table class="table table-bordered table-striped table-condensed">
  656. <thead>
  657. <tr>
  658. <th>Type</th>
  659. <th>Name</th>
  660. <th>Description</th>
  661. </tr>
  662. </thead>
  663. <tbody>
  664. <tr>
  665. <td><span class="xref">NStack.ustring</span></td>
  666. <td><span class="parametername">title</span></td>
  667. <td>Title for the query.</td>
  668. </tr>
  669. <tr>
  670. <td><span class="xref">NStack.ustring</span></td>
  671. <td><span class="parametername">message</span></td>
  672. <td>Message to display, might contain multiple lines.</td>
  673. </tr>
  674. <tr>
  675. <td><span class="xref">System.Int32</span></td>
  676. <td><span class="parametername">defaultButton</span></td>
  677. <td>Index of the default button.</td>
  678. </tr>
  679. <tr>
  680. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  681. <td><span class="parametername">border</span></td>
  682. <td>The border settings.</td>
  683. </tr>
  684. <tr>
  685. <td><span class="xref">NStack.ustring</span>[]</td>
  686. <td><span class="parametername">buttons</span></td>
  687. <td>Array of buttons to add.</td>
  688. </tr>
  689. </tbody>
  690. </table>
  691. <h5 class="returns">Returns</h5>
  692. <table class="table table-bordered table-striped table-condensed">
  693. <thead>
  694. <tr>
  695. <th>Type</th>
  696. <th>Description</th>
  697. </tr>
  698. </thead>
  699. <tbody>
  700. <tr>
  701. <td><span class="xref">System.Int32</span></td>
  702. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  703. </tr>
  704. </tbody>
  705. </table>
  706. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  707. <div class="markdown level1 remarks">
  708. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  709. from the size of the message and buttons.
  710. </div>
  711. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  712. <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>
  713. <div class="markdown level1 summary">
  714. 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.
  715. </div>
  716. <div class="markdown level1 conceptual"></div>
  717. <h5 class="decalaration">Declaration</h5>
  718. <div class="codewrapper">
  719. <pre><code class="lang-csharp hljs">public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons)</code></pre>
  720. </div>
  721. <h5 class="parameters">Parameters</h5>
  722. <table class="table table-bordered table-striped table-condensed">
  723. <thead>
  724. <tr>
  725. <th>Type</th>
  726. <th>Name</th>
  727. <th>Description</th>
  728. </tr>
  729. </thead>
  730. <tbody>
  731. <tr>
  732. <td><span class="xref">System.Int32</span></td>
  733. <td><span class="parametername">width</span></td>
  734. <td>Width for the window.</td>
  735. </tr>
  736. <tr>
  737. <td><span class="xref">System.Int32</span></td>
  738. <td><span class="parametername">height</span></td>
  739. <td>Height for the window.</td>
  740. </tr>
  741. <tr>
  742. <td><span class="xref">NStack.ustring</span></td>
  743. <td><span class="parametername">title</span></td>
  744. <td>Title for the query.</td>
  745. </tr>
  746. <tr>
  747. <td><span class="xref">NStack.ustring</span></td>
  748. <td><span class="parametername">message</span></td>
  749. <td>Message to display, might contain multiple lines.</td>
  750. </tr>
  751. <tr>
  752. <td><span class="xref">NStack.ustring</span>[]</td>
  753. <td><span class="parametername">buttons</span></td>
  754. <td>Array of buttons to add.</td>
  755. </tr>
  756. </tbody>
  757. </table>
  758. <h5 class="returns">Returns</h5>
  759. <table class="table table-bordered table-striped table-condensed">
  760. <thead>
  761. <tr>
  762. <th>Type</th>
  763. <th>Description</th>
  764. </tr>
  765. </thead>
  766. <tbody>
  767. <tr>
  768. <td><span class="xref">System.Int32</span></td>
  769. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  770. </tr>
  771. </tbody>
  772. </table>
  773. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  774. <div class="markdown level1 remarks">
  775. 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.
  776. </div>
  777. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  778. <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>
  779. <div class="markdown level1 summary">
  780. 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.
  781. </div>
  782. <div class="markdown level1 conceptual"></div>
  783. <h5 class="decalaration">Declaration</h5>
  784. <div class="codewrapper">
  785. <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>
  786. </div>
  787. <h5 class="parameters">Parameters</h5>
  788. <table class="table table-bordered table-striped table-condensed">
  789. <thead>
  790. <tr>
  791. <th>Type</th>
  792. <th>Name</th>
  793. <th>Description</th>
  794. </tr>
  795. </thead>
  796. <tbody>
  797. <tr>
  798. <td><span class="xref">System.Int32</span></td>
  799. <td><span class="parametername">width</span></td>
  800. <td>Width for the window.</td>
  801. </tr>
  802. <tr>
  803. <td><span class="xref">System.Int32</span></td>
  804. <td><span class="parametername">height</span></td>
  805. <td>Height for the window.</td>
  806. </tr>
  807. <tr>
  808. <td><span class="xref">NStack.ustring</span></td>
  809. <td><span class="parametername">title</span></td>
  810. <td>Title for the query.</td>
  811. </tr>
  812. <tr>
  813. <td><span class="xref">NStack.ustring</span></td>
  814. <td><span class="parametername">message</span></td>
  815. <td>Message to display, might contain multiple lines.</td>
  816. </tr>
  817. <tr>
  818. <td><span class="xref">System.Int32</span></td>
  819. <td><span class="parametername">defaultButton</span></td>
  820. <td>Index of the default button.</td>
  821. </tr>
  822. <tr>
  823. <td><span class="xref">NStack.ustring</span>[]</td>
  824. <td><span class="parametername">buttons</span></td>
  825. <td>Array of buttons to add.</td>
  826. </tr>
  827. </tbody>
  828. </table>
  829. <h5 class="returns">Returns</h5>
  830. <table class="table table-bordered table-striped table-condensed">
  831. <thead>
  832. <tr>
  833. <th>Type</th>
  834. <th>Description</th>
  835. </tr>
  836. </thead>
  837. <tbody>
  838. <tr>
  839. <td><span class="xref">System.Int32</span></td>
  840. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  841. </tr>
  842. </tbody>
  843. </table>
  844. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  845. <div class="markdown level1 remarks">
  846. 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.
  847. </div>
  848. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  849. <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>
  850. <div class="markdown level1 summary">
  851. 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.
  852. </div>
  853. <div class="markdown level1 conceptual"></div>
  854. <h5 class="decalaration">Declaration</h5>
  855. <div class="codewrapper">
  856. <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>
  857. </div>
  858. <h5 class="parameters">Parameters</h5>
  859. <table class="table table-bordered table-striped table-condensed">
  860. <thead>
  861. <tr>
  862. <th>Type</th>
  863. <th>Name</th>
  864. <th>Description</th>
  865. </tr>
  866. </thead>
  867. <tbody>
  868. <tr>
  869. <td><span class="xref">System.Int32</span></td>
  870. <td><span class="parametername">width</span></td>
  871. <td>Width for the window.</td>
  872. </tr>
  873. <tr>
  874. <td><span class="xref">System.Int32</span></td>
  875. <td><span class="parametername">height</span></td>
  876. <td>Height for the window.</td>
  877. </tr>
  878. <tr>
  879. <td><span class="xref">NStack.ustring</span></td>
  880. <td><span class="parametername">title</span></td>
  881. <td>Title for the query.</td>
  882. </tr>
  883. <tr>
  884. <td><span class="xref">NStack.ustring</span></td>
  885. <td><span class="parametername">message</span></td>
  886. <td>Message to display, might contain multiple lines.</td>
  887. </tr>
  888. <tr>
  889. <td><span class="xref">System.Int32</span></td>
  890. <td><span class="parametername">defaultButton</span></td>
  891. <td>Index of the default button.</td>
  892. </tr>
  893. <tr>
  894. <td><a class="xref" href="Terminal.Gui.Border.html">Border</a></td>
  895. <td><span class="parametername">border</span></td>
  896. <td>The border settings.</td>
  897. </tr>
  898. <tr>
  899. <td><span class="xref">NStack.ustring</span>[]</td>
  900. <td><span class="parametername">buttons</span></td>
  901. <td>Array of buttons to add.</td>
  902. </tr>
  903. </tbody>
  904. </table>
  905. <h5 class="returns">Returns</h5>
  906. <table class="table table-bordered table-striped table-condensed">
  907. <thead>
  908. <tr>
  909. <th>Type</th>
  910. <th>Description</th>
  911. </tr>
  912. </thead>
  913. <tbody>
  914. <tr>
  915. <td><span class="xref">System.Int32</span></td>
  916. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  917. </tr>
  918. </tbody>
  919. </table>
  920. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_Terminal_Gui_Border_NStack_ustring____remarks">Remarks</h5>
  921. <div class="markdown level1 remarks">
  922. 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.
  923. </div>
  924. </article>
  925. </div>
  926. <div class="hidden-sm col-md-2" role="complementary">
  927. <div class="sideaffix">
  928. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  929. <h5>In This Article</h5>
  930. <div></div>
  931. </nav>
  932. </div>
  933. </div>
  934. </div>
  935. </div>
  936. <footer>
  937. <div class="grad-bottom"></div>
  938. <div class="footer">
  939. <div class="container">
  940. <span class="pull-right">
  941. <a href="#top">Back to top</a>
  942. </span>
  943. <span>Generated by <strong>DocFX</strong></span>
  944. </div>
  945. </div>
  946. </footer>
  947. </div>
  948. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  949. <script type="text/javascript" src="../../styles/docfx.js"></script>
  950. <script type="text/javascript" src="../../styles/main.js"></script>
  951. </body>
  952. </html>