Terminal.Gui.TableView.TableStyle.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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 TableView.TableStyle
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class TableView.TableStyle
  11. ">
  12. <meta name="generator" content="docfx 2.58.5.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.TableView.TableStyle">
  73. <h1 id="Terminal_Gui_TableView_TableStyle" data-uid="Terminal.Gui.TableView.TableStyle" class="text-break">Class TableView.TableStyle
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Defines rendering options that affect how the table is displayed.
  77. <a href="https://migueldeicaza.github.io/gui.cs/articles/tableview.html">See TableView Deep Dive for more information</a>.
  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">TableView.TableStyle</span></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <span class="xref">System.Object.Equals(System.Object)</span>
  89. </div>
  90. <div>
  91. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  92. </div>
  93. <div>
  94. <span class="xref">System.Object.GetHashCode()</span>
  95. </div>
  96. <div>
  97. <span class="xref">System.Object.GetType()</span>
  98. </div>
  99. <div>
  100. <span class="xref">System.Object.MemberwiseClone()</span>
  101. </div>
  102. <div>
  103. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  104. </div>
  105. <div>
  106. <span class="xref">System.Object.ToString()</span>
  107. </div>
  108. </div>
  109. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  110. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  111. <h5 id="Terminal_Gui_TableView_TableStyle_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public class TableStyle</code></pre>
  114. </div>
  115. <h3 id="properties">Properties
  116. </h3>
  117. <a id="Terminal_Gui_TableView_TableStyle_AlwaysShowHeaders_" data-uid="Terminal.Gui.TableView.TableStyle.AlwaysShowHeaders*"></a>
  118. <h4 id="Terminal_Gui_TableView_TableStyle_AlwaysShowHeaders" data-uid="Terminal.Gui.TableView.TableStyle.AlwaysShowHeaders">AlwaysShowHeaders</h4>
  119. <div class="markdown level1 summary">
  120. When scrolling down always lock the column headers in place as the first row of the table
  121. </div>
  122. <div class="markdown level1 conceptual"></div>
  123. <h5 class="decalaration">Declaration</h5>
  124. <div class="codewrapper">
  125. <pre><code class="lang-csharp hljs">public bool AlwaysShowHeaders { get; set; }</code></pre>
  126. </div>
  127. <h5 class="propertyValue">Property Value</h5>
  128. <table class="table table-bordered table-striped table-condensed">
  129. <thead>
  130. <tr>
  131. <th>Type</th>
  132. <th>Description</th>
  133. </tr>
  134. </thead>
  135. <tbody>
  136. <tr>
  137. <td><span class="xref">System.Boolean</span></td>
  138. <td></td>
  139. </tr>
  140. </tbody>
  141. </table>
  142. <a id="Terminal_Gui_TableView_TableStyle_ColumnStyles_" data-uid="Terminal.Gui.TableView.TableStyle.ColumnStyles*"></a>
  143. <h4 id="Terminal_Gui_TableView_TableStyle_ColumnStyles" data-uid="Terminal.Gui.TableView.TableStyle.ColumnStyles">ColumnStyles</h4>
  144. <div class="markdown level1 summary">
  145. Collection of columns for which you want special rendering (e.g. custom column lengths, text alignment etc)
  146. </div>
  147. <div class="markdown level1 conceptual"></div>
  148. <h5 class="decalaration">Declaration</h5>
  149. <div class="codewrapper">
  150. <pre><code class="lang-csharp hljs">public Dictionary&lt;DataColumn, TableView.ColumnStyle&gt; ColumnStyles { get; set; }</code></pre>
  151. </div>
  152. <h5 class="propertyValue">Property Value</h5>
  153. <table class="table table-bordered table-striped table-condensed">
  154. <thead>
  155. <tr>
  156. <th>Type</th>
  157. <th>Description</th>
  158. </tr>
  159. </thead>
  160. <tbody>
  161. <tr>
  162. <td><span class="xref">System.Collections.Generic.Dictionary</span>&lt;<span class="xref">System.Data.DataColumn</span>, <a class="xref" href="Terminal.Gui.TableView.ColumnStyle.html">TableView.ColumnStyle</a>&gt;</td>
  163. <td></td>
  164. </tr>
  165. </tbody>
  166. </table>
  167. <a id="Terminal_Gui_TableView_TableStyle_ExpandLastColumn_" data-uid="Terminal.Gui.TableView.TableStyle.ExpandLastColumn*"></a>
  168. <h4 id="Terminal_Gui_TableView_TableStyle_ExpandLastColumn" data-uid="Terminal.Gui.TableView.TableStyle.ExpandLastColumn">ExpandLastColumn</h4>
  169. <div class="markdown level1 summary">
  170. Determines rendering when the last column in the table is visible but it&apos;s
  171. content or <a class="xref" href="Terminal.Gui.TableView.ColumnStyle.html#Terminal_Gui_TableView_ColumnStyle_MaxWidth">MaxWidth</a> is less than the remaining
  172. space in the control. True (the default) will expand the column to fill
  173. the remaining bounds of the control. False will draw a column ending line
  174. and leave a blank column that cannot be selected in the remaining space.
  175. </div>
  176. <div class="markdown level1 conceptual"></div>
  177. <h5 class="decalaration">Declaration</h5>
  178. <div class="codewrapper">
  179. <pre><code class="lang-csharp hljs">public bool ExpandLastColumn { get; set; }</code></pre>
  180. </div>
  181. <h5 class="propertyValue">Property Value</h5>
  182. <table class="table table-bordered table-striped table-condensed">
  183. <thead>
  184. <tr>
  185. <th>Type</th>
  186. <th>Description</th>
  187. </tr>
  188. </thead>
  189. <tbody>
  190. <tr>
  191. <td><span class="xref">System.Boolean</span></td>
  192. <td></td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. <a id="Terminal_Gui_TableView_TableStyle_InvertSelectedCellFirstCharacter_" data-uid="Terminal.Gui.TableView.TableStyle.InvertSelectedCellFirstCharacter*"></a>
  197. <h4 id="Terminal_Gui_TableView_TableStyle_InvertSelectedCellFirstCharacter" data-uid="Terminal.Gui.TableView.TableStyle.InvertSelectedCellFirstCharacter">InvertSelectedCellFirstCharacter</h4>
  198. <div class="markdown level1 summary">
  199. True to invert the colors of the first symbol of the selected cell in the <a class="xref" href="Terminal.Gui.TableView.html">TableView</a>.
  200. This gives the appearance of a cursor for when the <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> doesn&apos;t otherwise show
  201. this
  202. </div>
  203. <div class="markdown level1 conceptual"></div>
  204. <h5 class="decalaration">Declaration</h5>
  205. <div class="codewrapper">
  206. <pre><code class="lang-csharp hljs">public bool InvertSelectedCellFirstCharacter { get; set; }</code></pre>
  207. </div>
  208. <h5 class="propertyValue">Property Value</h5>
  209. <table class="table table-bordered table-striped table-condensed">
  210. <thead>
  211. <tr>
  212. <th>Type</th>
  213. <th>Description</th>
  214. </tr>
  215. </thead>
  216. <tbody>
  217. <tr>
  218. <td><span class="xref">System.Boolean</span></td>
  219. <td></td>
  220. </tr>
  221. </tbody>
  222. </table>
  223. <a id="Terminal_Gui_TableView_TableStyle_RowColorGetter_" data-uid="Terminal.Gui.TableView.TableStyle.RowColorGetter*"></a>
  224. <h4 id="Terminal_Gui_TableView_TableStyle_RowColorGetter" data-uid="Terminal.Gui.TableView.TableStyle.RowColorGetter">RowColorGetter</h4>
  225. <div class="markdown level1 summary">
  226. Delegate for coloring specific rows in a different color. For cell color <a class="xref" href="Terminal.Gui.TableView.ColumnStyle.html#Terminal_Gui_TableView_ColumnStyle_ColorGetter">ColorGetter</a>
  227. </div>
  228. <div class="markdown level1 conceptual"></div>
  229. <h5 class="decalaration">Declaration</h5>
  230. <div class="codewrapper">
  231. <pre><code class="lang-csharp hljs">public TableView.RowColorGetterDelegate RowColorGetter { get; set; }</code></pre>
  232. </div>
  233. <h5 class="propertyValue">Property Value</h5>
  234. <table class="table table-bordered table-striped table-condensed">
  235. <thead>
  236. <tr>
  237. <th>Type</th>
  238. <th>Description</th>
  239. </tr>
  240. </thead>
  241. <tbody>
  242. <tr>
  243. <td><a class="xref" href="Terminal.Gui.TableView.RowColorGetterDelegate.html">TableView.RowColorGetterDelegate</a></td>
  244. <td></td>
  245. </tr>
  246. </tbody>
  247. </table>
  248. <a id="Terminal_Gui_TableView_TableStyle_ShowHorizontalHeaderOverline_" data-uid="Terminal.Gui.TableView.TableStyle.ShowHorizontalHeaderOverline*"></a>
  249. <h4 id="Terminal_Gui_TableView_TableStyle_ShowHorizontalHeaderOverline" data-uid="Terminal.Gui.TableView.TableStyle.ShowHorizontalHeaderOverline">ShowHorizontalHeaderOverline</h4>
  250. <div class="markdown level1 summary">
  251. True to render a solid line above the headers
  252. </div>
  253. <div class="markdown level1 conceptual"></div>
  254. <h5 class="decalaration">Declaration</h5>
  255. <div class="codewrapper">
  256. <pre><code class="lang-csharp hljs">public bool ShowHorizontalHeaderOverline { get; set; }</code></pre>
  257. </div>
  258. <h5 class="propertyValue">Property Value</h5>
  259. <table class="table table-bordered table-striped table-condensed">
  260. <thead>
  261. <tr>
  262. <th>Type</th>
  263. <th>Description</th>
  264. </tr>
  265. </thead>
  266. <tbody>
  267. <tr>
  268. <td><span class="xref">System.Boolean</span></td>
  269. <td></td>
  270. </tr>
  271. </tbody>
  272. </table>
  273. <a id="Terminal_Gui_TableView_TableStyle_ShowHorizontalHeaderUnderline_" data-uid="Terminal.Gui.TableView.TableStyle.ShowHorizontalHeaderUnderline*"></a>
  274. <h4 id="Terminal_Gui_TableView_TableStyle_ShowHorizontalHeaderUnderline" data-uid="Terminal.Gui.TableView.TableStyle.ShowHorizontalHeaderUnderline">ShowHorizontalHeaderUnderline</h4>
  275. <div class="markdown level1 summary">
  276. True to render a solid line under the headers
  277. </div>
  278. <div class="markdown level1 conceptual"></div>
  279. <h5 class="decalaration">Declaration</h5>
  280. <div class="codewrapper">
  281. <pre><code class="lang-csharp hljs">public bool ShowHorizontalHeaderUnderline { get; set; }</code></pre>
  282. </div>
  283. <h5 class="propertyValue">Property Value</h5>
  284. <table class="table table-bordered table-striped table-condensed">
  285. <thead>
  286. <tr>
  287. <th>Type</th>
  288. <th>Description</th>
  289. </tr>
  290. </thead>
  291. <tbody>
  292. <tr>
  293. <td><span class="xref">System.Boolean</span></td>
  294. <td></td>
  295. </tr>
  296. </tbody>
  297. </table>
  298. <a id="Terminal_Gui_TableView_TableStyle_ShowVerticalCellLines_" data-uid="Terminal.Gui.TableView.TableStyle.ShowVerticalCellLines*"></a>
  299. <h4 id="Terminal_Gui_TableView_TableStyle_ShowVerticalCellLines" data-uid="Terminal.Gui.TableView.TableStyle.ShowVerticalCellLines">ShowVerticalCellLines</h4>
  300. <div class="markdown level1 summary">
  301. True to render a solid line vertical line between cells
  302. </div>
  303. <div class="markdown level1 conceptual"></div>
  304. <h5 class="decalaration">Declaration</h5>
  305. <div class="codewrapper">
  306. <pre><code class="lang-csharp hljs">public bool ShowVerticalCellLines { get; set; }</code></pre>
  307. </div>
  308. <h5 class="propertyValue">Property Value</h5>
  309. <table class="table table-bordered table-striped table-condensed">
  310. <thead>
  311. <tr>
  312. <th>Type</th>
  313. <th>Description</th>
  314. </tr>
  315. </thead>
  316. <tbody>
  317. <tr>
  318. <td><span class="xref">System.Boolean</span></td>
  319. <td></td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. <a id="Terminal_Gui_TableView_TableStyle_ShowVerticalHeaderLines_" data-uid="Terminal.Gui.TableView.TableStyle.ShowVerticalHeaderLines*"></a>
  324. <h4 id="Terminal_Gui_TableView_TableStyle_ShowVerticalHeaderLines" data-uid="Terminal.Gui.TableView.TableStyle.ShowVerticalHeaderLines">ShowVerticalHeaderLines</h4>
  325. <div class="markdown level1 summary">
  326. True to render a solid line vertical line between headers
  327. </div>
  328. <div class="markdown level1 conceptual"></div>
  329. <h5 class="decalaration">Declaration</h5>
  330. <div class="codewrapper">
  331. <pre><code class="lang-csharp hljs">public bool ShowVerticalHeaderLines { get; set; }</code></pre>
  332. </div>
  333. <h5 class="propertyValue">Property Value</h5>
  334. <table class="table table-bordered table-striped table-condensed">
  335. <thead>
  336. <tr>
  337. <th>Type</th>
  338. <th>Description</th>
  339. </tr>
  340. </thead>
  341. <tbody>
  342. <tr>
  343. <td><span class="xref">System.Boolean</span></td>
  344. <td></td>
  345. </tr>
  346. </tbody>
  347. </table>
  348. <h3 id="methods">Methods
  349. </h3>
  350. <a id="Terminal_Gui_TableView_TableStyle_GetColumnStyleIfAny_" data-uid="Terminal.Gui.TableView.TableStyle.GetColumnStyleIfAny*"></a>
  351. <h4 id="Terminal_Gui_TableView_TableStyle_GetColumnStyleIfAny_System_Data_DataColumn_" data-uid="Terminal.Gui.TableView.TableStyle.GetColumnStyleIfAny(System.Data.DataColumn)">GetColumnStyleIfAny(DataColumn)</h4>
  352. <div class="markdown level1 summary">
  353. Returns the entry from <a class="xref" href="Terminal.Gui.TableView.TableStyle.html#Terminal_Gui_TableView_TableStyle_ColumnStyles">ColumnStyles</a> for the given <code data-dev-comment-type="paramref" class="paramref">col</code> or null if no custom styling is defined for it
  354. </div>
  355. <div class="markdown level1 conceptual"></div>
  356. <h5 class="decalaration">Declaration</h5>
  357. <div class="codewrapper">
  358. <pre><code class="lang-csharp hljs">public TableView.ColumnStyle GetColumnStyleIfAny(DataColumn col)</code></pre>
  359. </div>
  360. <h5 class="parameters">Parameters</h5>
  361. <table class="table table-bordered table-striped table-condensed">
  362. <thead>
  363. <tr>
  364. <th>Type</th>
  365. <th>Name</th>
  366. <th>Description</th>
  367. </tr>
  368. </thead>
  369. <tbody>
  370. <tr>
  371. <td><span class="xref">System.Data.DataColumn</span></td>
  372. <td><span class="parametername">col</span></td>
  373. <td></td>
  374. </tr>
  375. </tbody>
  376. </table>
  377. <h5 class="returns">Returns</h5>
  378. <table class="table table-bordered table-striped table-condensed">
  379. <thead>
  380. <tr>
  381. <th>Type</th>
  382. <th>Description</th>
  383. </tr>
  384. </thead>
  385. <tbody>
  386. <tr>
  387. <td><a class="xref" href="Terminal.Gui.TableView.ColumnStyle.html">TableView.ColumnStyle</a></td>
  388. <td></td>
  389. </tr>
  390. </tbody>
  391. </table>
  392. <a id="Terminal_Gui_TableView_TableStyle_GetOrCreateColumnStyle_" data-uid="Terminal.Gui.TableView.TableStyle.GetOrCreateColumnStyle*"></a>
  393. <h4 id="Terminal_Gui_TableView_TableStyle_GetOrCreateColumnStyle_System_Data_DataColumn_" data-uid="Terminal.Gui.TableView.TableStyle.GetOrCreateColumnStyle(System.Data.DataColumn)">GetOrCreateColumnStyle(DataColumn)</h4>
  394. <div class="markdown level1 summary">
  395. Returns an existing <a class="xref" href="Terminal.Gui.TableView.ColumnStyle.html">TableView.ColumnStyle</a> for the given <code data-dev-comment-type="paramref" class="paramref">col</code> or creates a new one with default options
  396. </div>
  397. <div class="markdown level1 conceptual"></div>
  398. <h5 class="decalaration">Declaration</h5>
  399. <div class="codewrapper">
  400. <pre><code class="lang-csharp hljs">public TableView.ColumnStyle GetOrCreateColumnStyle(DataColumn col)</code></pre>
  401. </div>
  402. <h5 class="parameters">Parameters</h5>
  403. <table class="table table-bordered table-striped table-condensed">
  404. <thead>
  405. <tr>
  406. <th>Type</th>
  407. <th>Name</th>
  408. <th>Description</th>
  409. </tr>
  410. </thead>
  411. <tbody>
  412. <tr>
  413. <td><span class="xref">System.Data.DataColumn</span></td>
  414. <td><span class="parametername">col</span></td>
  415. <td></td>
  416. </tr>
  417. </tbody>
  418. </table>
  419. <h5 class="returns">Returns</h5>
  420. <table class="table table-bordered table-striped table-condensed">
  421. <thead>
  422. <tr>
  423. <th>Type</th>
  424. <th>Description</th>
  425. </tr>
  426. </thead>
  427. <tbody>
  428. <tr>
  429. <td><a class="xref" href="Terminal.Gui.TableView.ColumnStyle.html">TableView.ColumnStyle</a></td>
  430. <td></td>
  431. </tr>
  432. </tbody>
  433. </table>
  434. </article>
  435. </div>
  436. <div class="hidden-sm col-md-2" role="complementary">
  437. <div class="sideaffix">
  438. <div class="contribution">
  439. <ul class="nav">
  440. </ul>
  441. </div>
  442. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  443. <h5>In This Article</h5>
  444. <div></div>
  445. </nav>
  446. </div>
  447. </div>
  448. </div>
  449. </div>
  450. <footer>
  451. <div class="grad-bottom"></div>
  452. <div class="footer">
  453. <div class="container">
  454. <span class="pull-right">
  455. <a href="#top">Back to top</a>
  456. </span>
  457. <span>Generated by <strong>DocFX</strong></span>
  458. </div>
  459. </div>
  460. </footer>
  461. </div>
  462. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  463. <script type="text/javascript" src="../../styles/docfx.js"></script>
  464. <script type="text/javascript" src="../../styles/main.js"></script>
  465. </body>
  466. </html>