Popular recipes tagged "meta:loc=1145"http://code.activestate.com/recipes/tags/meta:loc=1145/2017-05-02T22:27:48-07:00ActiveState Code RecipesTkinter treeview like a table or multicolumn listbox (Python)
2017-05-02T22:27:48-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580746-tkinter-treeview-like-a-table-or-multicolumn-listb/
<p style="color: grey">
Python
recipe 580746
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/editable/">editable</a>, <a href="/recipes/tags/listbox/">listbox</a>, <a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/multicolumn/">multicolumn</a>, <a href="/recipes/tags/table/">table</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/treeview/">treeview</a>).
Revision 33.
</p>
<p>This trick provides use my other recipe:</p>
<p><a href="https://code.activestate.com/recipes/580794-simple-multicolumn-listbox-for-tkinter/" rel="nofollow">https://code.activestate.com/recipes/580794-simple-multicolumn-listbox-for-tkinter/</a></p>
<p>This recipes defines a <em>Tk_Table:</em> A table that extends the multicolumn listbox adding row numbers, making the cells editable and adding autoscrollbars.</p>
<p><em>Tk_Table</em></p>
<p>It has the same options than <em>Multicolumn_Listbox</em>, and some extra parameters to configure the new functionality.</p>
<p>Setting the editable keyword to True, makes the widget editable.</p>
<p>If you want stripped rows, pass the stripped_rows with a tuple (or list) of two colors.</p>
<p>If you want row numbers, then pass to <em>row_numbers</em> parameter a True value.</p>
<p>These are the extra options for this class:</p>
<ul>
<li>entry_background</li>
<li>entry_foreground</li>
<li>entry_validatecommand</li>
<li>entry_selectbackground</li>
<li>entry_selectborderwidth</li>
<li>entry_selectforeground</li>
<li>scrollbar_background</li>
<li>scrollbar_troughcolor</li>
<li>rowlabel_anchor</li>
<li>rowlabel_minwidth</li>
<li>rowlabel_hoverbackground</li>
<li>frame_relief</li>
<li>frame_borderwidth</li>
<li>frame_background</li>
<li>row_numbers</li>
</ul>