Terminal.Gui.MessageBox.html 36 KB

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