<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/CustomTableView:addColumn?action=history&amp;feed=atom</id>
	<title>CustomTableView:addColumn - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/CustomTableView:addColumn?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CustomTableView:addColumn&amp;action=history"/>
	<updated>2026-04-04T06:45:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CustomTableView:addColumn&amp;diff=57512&amp;oldid=prev</id>
		<title>AriosJentu: Created page with &quot;__NOTOC__ {{Client function}} This function adds column to Custom Table View.  == Syntax == &lt;syntaxhighlight lang=&quot;lua&quot;&gt; ccolumn CustomTableView:addColumn([string Title, float...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CustomTableView:addColumn&amp;diff=57512&amp;oldid=prev"/>
		<updated>2018-08-06T09:02:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ {{Client function}} This function adds column to Custom Table View.  == Syntax == &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; ccolumn CustomTableView:addColumn([string Title, float...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function adds column to Custom Table View.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ccolumn CustomTableView:addColumn([string Title, float Width])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other Arguments === &lt;br /&gt;
*'''Title''' - String of column title. Default - ''%Empty%''.&lt;br /&gt;
*'''Width''' - Width of column. Default - ''50''.&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
Returns table with parameters of column, called ''ccolumn''.	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
[[Image:CustomTabViewDefault.png|thumb|right|Code Example]]&lt;br /&gt;
[[Image:CustomTableViewAsScrollableList.png|thumb|right|Code Example with &amp;quot;K&amp;quot; clicked]]&lt;br /&gt;
This example creates window with table view, here added some columns and lines (rows), changed indentation between lines, removed line, removed column, set selected line, and filling of cells. Bound ''K'' button for showing and hiding title panel of Table View:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local Window = CustomWindow.create(50, 50, 250, 220, &amp;quot;Example&amp;quot;)&lt;br /&gt;
local TabView = CustomTableView.create(5, 25, 130, 40, false, Window)&lt;br /&gt;
&lt;br /&gt;
TabView:addLine(21)&lt;br /&gt;
local nline = TabView:addLine(25)&lt;br /&gt;
TabView:addLine(21)&lt;br /&gt;
local line = TabView:addLine(28)&lt;br /&gt;
TabView:addLine(21)&lt;br /&gt;
TabView:addLine(31)&lt;br /&gt;
TabView:addLine(21)&lt;br /&gt;
TabView:addLine(35)&lt;br /&gt;
TabView:addLine(21)&lt;br /&gt;
&lt;br /&gt;
TabView:removeLine(line)&lt;br /&gt;
TabView:setIndentation(5)&lt;br /&gt;
TabView:setSize(240, 190, false)&lt;br /&gt;
&lt;br /&gt;
TabView:setSelectedLine(3)&lt;br /&gt;
&lt;br /&gt;
TabView:addColumn(&amp;quot;Example&amp;quot;, 90)&lt;br /&gt;
TabView:addColumn(&amp;quot;Removed&amp;quot;, 90)&lt;br /&gt;
local col = TabView:addColumn(&amp;quot;Saved&amp;quot;, 90)&lt;br /&gt;
TabView:addColumn(&amp;quot;Last&amp;quot;, 90)&lt;br /&gt;
&lt;br /&gt;
TabView:removeColumn(&amp;quot;Removed&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
for i = 1, TabView:getLinesCount() do&lt;br /&gt;
	for j = 1, TabView:getColumnsCount() do&lt;br /&gt;
		TabView:setCellText(i, j, i..&amp;quot; &amp;quot;..j)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
bindKey(&amp;quot;k&amp;quot;, &amp;quot;up&amp;quot;, function()&lt;br /&gt;
	TabView:setTitleBarVisible(not TabView:getTitleBarVisible())&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
Window:setColorScheme(Themes.Dark.Red)	&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{CWSFUNCS}}&lt;/div&gt;</summary>
		<author><name>AriosJentu</name></author>
	</entry>
</feed>