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