Terminal.Gui.MessageBox.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  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.56.7.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_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>
  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(int width, int height, ustring title, ustring message, 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">System.Int32</span></td>
  263. <td><span class="parametername">width</span></td>
  264. <td>Width for the window.</td>
  265. </tr>
  266. <tr>
  267. <td><span class="xref">System.Int32</span></td>
  268. <td><span class="parametername">height</span></td>
  269. <td>Height for the window.</td>
  270. </tr>
  271. <tr>
  272. <td><span class="xref">NStack.ustring</span></td>
  273. <td><span class="parametername">title</span></td>
  274. <td>Title for the query.</td>
  275. </tr>
  276. <tr>
  277. <td><span class="xref">NStack.ustring</span></td>
  278. <td><span class="parametername">message</span></td>
  279. <td>Message to display, might contain multiple lines.</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_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  304. <div class="markdown level1 remarks">
  305. 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.
  306. </div>
  307. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  308. <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>
  309. <div class="markdown level1 summary">
  310. 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.
  311. </div>
  312. <div class="markdown level1 conceptual"></div>
  313. <h5 class="decalaration">Declaration</h5>
  314. <div class="codewrapper">
  315. <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>
  316. </div>
  317. <h5 class="parameters">Parameters</h5>
  318. <table class="table table-bordered table-striped table-condensed">
  319. <thead>
  320. <tr>
  321. <th>Type</th>
  322. <th>Name</th>
  323. <th>Description</th>
  324. </tr>
  325. </thead>
  326. <tbody>
  327. <tr>
  328. <td><span class="xref">System.Int32</span></td>
  329. <td><span class="parametername">width</span></td>
  330. <td>Width for the window.</td>
  331. </tr>
  332. <tr>
  333. <td><span class="xref">System.Int32</span></td>
  334. <td><span class="parametername">height</span></td>
  335. <td>Height for the window.</td>
  336. </tr>
  337. <tr>
  338. <td><span class="xref">NStack.ustring</span></td>
  339. <td><span class="parametername">title</span></td>
  340. <td>Title for the query.</td>
  341. </tr>
  342. <tr>
  343. <td><span class="xref">NStack.ustring</span></td>
  344. <td><span class="parametername">message</span></td>
  345. <td>Message to display, might contain multiple lines.</td>
  346. </tr>
  347. <tr>
  348. <td><span class="xref">System.Int32</span></td>
  349. <td><span class="parametername">defaultButton</span></td>
  350. <td>Index of the default button.</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_System_Int32_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_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  379. <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>
  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 Query(ustring title, ustring message, 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">NStack.ustring</span></td>
  400. <td><span class="parametername">title</span></td>
  401. <td>Title for the query.</td>
  402. </tr>
  403. <tr>
  404. <td><span class="xref">NStack.ustring</span></td>
  405. <td><span class="parametername">message</span></td>
  406. <td>Message to display, might contain multiple lines.</td>
  407. </tr>
  408. <tr>
  409. <td><span class="xref">NStack.ustring</span>[]</td>
  410. <td><span class="parametername">buttons</span></td>
  411. <td>Array of buttons to add.</td>
  412. </tr>
  413. </tbody>
  414. </table>
  415. <h5 class="returns">Returns</h5>
  416. <table class="table table-bordered table-striped table-condensed">
  417. <thead>
  418. <tr>
  419. <th>Type</th>
  420. <th>Description</th>
  421. </tr>
  422. </thead>
  423. <tbody>
  424. <tr>
  425. <td><span class="xref">System.Int32</span></td>
  426. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  427. </tr>
  428. </tbody>
  429. </table>
  430. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  431. <div class="markdown level1 remarks">
  432. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  433. from the size of the message and buttons.
  434. </div>
  435. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  436. <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>
  437. <div class="markdown level1 summary">
  438. 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.
  439. </div>
  440. <div class="markdown level1 conceptual"></div>
  441. <h5 class="decalaration">Declaration</h5>
  442. <div class="codewrapper">
  443. <pre><code class="lang-csharp hljs">public static int Query(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)</code></pre>
  444. </div>
  445. <h5 class="parameters">Parameters</h5>
  446. <table class="table table-bordered table-striped table-condensed">
  447. <thead>
  448. <tr>
  449. <th>Type</th>
  450. <th>Name</th>
  451. <th>Description</th>
  452. </tr>
  453. </thead>
  454. <tbody>
  455. <tr>
  456. <td><span class="xref">NStack.ustring</span></td>
  457. <td><span class="parametername">title</span></td>
  458. <td>Title for the query.</td>
  459. </tr>
  460. <tr>
  461. <td><span class="xref">NStack.ustring</span></td>
  462. <td><span class="parametername">message</span></td>
  463. <td>Message to display, might contain multiple lines.</td>
  464. </tr>
  465. <tr>
  466. <td><span class="xref">System.Int32</span></td>
  467. <td><span class="parametername">defaultButton</span></td>
  468. <td>Index of the default button.</td>
  469. </tr>
  470. <tr>
  471. <td><span class="xref">NStack.ustring</span>[]</td>
  472. <td><span class="parametername">buttons</span></td>
  473. <td>Array of buttons to add.</td>
  474. </tr>
  475. </tbody>
  476. </table>
  477. <h5 class="returns">Returns</h5>
  478. <table class="table table-bordered table-striped table-condensed">
  479. <thead>
  480. <tr>
  481. <th>Type</th>
  482. <th>Description</th>
  483. </tr>
  484. </thead>
  485. <tbody>
  486. <tr>
  487. <td><span class="xref">System.Int32</span></td>
  488. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  489. </tr>
  490. </tbody>
  491. </table>
  492. <h5 id="Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  493. <div class="markdown level1 remarks">
  494. The message box will be vertically and horizontally centered in the container and the size will be automatically determined
  495. from the size of the message and buttons.
  496. </div>
  497. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  498. <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>
  499. <div class="markdown level1 summary">
  500. 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.
  501. </div>
  502. <div class="markdown level1 conceptual"></div>
  503. <h5 class="decalaration">Declaration</h5>
  504. <div class="codewrapper">
  505. <pre><code class="lang-csharp hljs">public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons)</code></pre>
  506. </div>
  507. <h5 class="parameters">Parameters</h5>
  508. <table class="table table-bordered table-striped table-condensed">
  509. <thead>
  510. <tr>
  511. <th>Type</th>
  512. <th>Name</th>
  513. <th>Description</th>
  514. </tr>
  515. </thead>
  516. <tbody>
  517. <tr>
  518. <td><span class="xref">System.Int32</span></td>
  519. <td><span class="parametername">width</span></td>
  520. <td>Width for the window.</td>
  521. </tr>
  522. <tr>
  523. <td><span class="xref">System.Int32</span></td>
  524. <td><span class="parametername">height</span></td>
  525. <td>Height for the window.</td>
  526. </tr>
  527. <tr>
  528. <td><span class="xref">NStack.ustring</span></td>
  529. <td><span class="parametername">title</span></td>
  530. <td>Title for the query.</td>
  531. </tr>
  532. <tr>
  533. <td><span class="xref">NStack.ustring</span></td>
  534. <td><span class="parametername">message</span></td>
  535. <td>Message to display, might contain multiple lines.</td>
  536. </tr>
  537. <tr>
  538. <td><span class="xref">NStack.ustring</span>[]</td>
  539. <td><span class="parametername">buttons</span></td>
  540. <td>Array of buttons to add.</td>
  541. </tr>
  542. </tbody>
  543. </table>
  544. <h5 class="returns">Returns</h5>
  545. <table class="table table-bordered table-striped table-condensed">
  546. <thead>
  547. <tr>
  548. <th>Type</th>
  549. <th>Description</th>
  550. </tr>
  551. </thead>
  552. <tbody>
  553. <tr>
  554. <td><span class="xref">System.Int32</span></td>
  555. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  556. </tr>
  557. </tbody>
  558. </table>
  559. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring____remarks">Remarks</h5>
  560. <div class="markdown level1 remarks">
  561. 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.
  562. </div>
  563. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  564. <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>
  565. <div class="markdown level1 summary">
  566. 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.
  567. </div>
  568. <div class="markdown level1 conceptual"></div>
  569. <h5 class="decalaration">Declaration</h5>
  570. <div class="codewrapper">
  571. <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>
  572. </div>
  573. <h5 class="parameters">Parameters</h5>
  574. <table class="table table-bordered table-striped table-condensed">
  575. <thead>
  576. <tr>
  577. <th>Type</th>
  578. <th>Name</th>
  579. <th>Description</th>
  580. </tr>
  581. </thead>
  582. <tbody>
  583. <tr>
  584. <td><span class="xref">System.Int32</span></td>
  585. <td><span class="parametername">width</span></td>
  586. <td>Width for the window.</td>
  587. </tr>
  588. <tr>
  589. <td><span class="xref">System.Int32</span></td>
  590. <td><span class="parametername">height</span></td>
  591. <td>Height for the window.</td>
  592. </tr>
  593. <tr>
  594. <td><span class="xref">NStack.ustring</span></td>
  595. <td><span class="parametername">title</span></td>
  596. <td>Title for the query.</td>
  597. </tr>
  598. <tr>
  599. <td><span class="xref">NStack.ustring</span></td>
  600. <td><span class="parametername">message</span></td>
  601. <td>Message to display, might contain multiple lines.</td>
  602. </tr>
  603. <tr>
  604. <td><span class="xref">System.Int32</span></td>
  605. <td><span class="parametername">defaultButton</span></td>
  606. <td>Index of the default button.</td>
  607. </tr>
  608. <tr>
  609. <td><span class="xref">NStack.ustring</span>[]</td>
  610. <td><span class="parametername">buttons</span></td>
  611. <td>Array of buttons to add.</td>
  612. </tr>
  613. </tbody>
  614. </table>
  615. <h5 class="returns">Returns</h5>
  616. <table class="table table-bordered table-striped table-condensed">
  617. <thead>
  618. <tr>
  619. <th>Type</th>
  620. <th>Description</th>
  621. </tr>
  622. </thead>
  623. <tbody>
  624. <tr>
  625. <td><span class="xref">System.Int32</span></td>
  626. <td>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</td>
  627. </tr>
  628. </tbody>
  629. </table>
  630. <h5 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_System_Int32_NStack_ustring____remarks">Remarks</h5>
  631. <div class="markdown level1 remarks">
  632. 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.
  633. </div>
  634. </article>
  635. </div>
  636. <div class="hidden-sm col-md-2" role="complementary">
  637. <div class="sideaffix">
  638. <div class="contribution">
  639. <ul class="nav">
  640. </ul>
  641. </div>
  642. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  643. <h5>In This Article</h5>
  644. <div></div>
  645. </nav>
  646. </div>
  647. </div>
  648. </div>
  649. </div>
  650. <footer>
  651. <div class="grad-bottom"></div>
  652. <div class="footer">
  653. <div class="container">
  654. <span class="pull-right">
  655. <a href="#top">Back to top</a>
  656. </span>
  657. <span>Generated by <strong>DocFX</strong></span>
  658. </div>
  659. </div>
  660. </footer>
  661. </div>
  662. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  663. <script type="text/javascript" src="../../styles/docfx.js"></script>
  664. <script type="text/javascript" src="../../styles/main.js"></script>
  665. </body>
  666. </html>