Terminal.Gui.MessageBox.html 48 KB

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