Popular recipes tagged "multicolumn"http://code.activestate.com/recipes/tags/multicolumn/2017-05-02T22:27:48-07:00ActiveState Code RecipesSimple multicolumn listbox for tkinter (Python) 2017-05-02T22:27:15-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580794-simple-multicolumn-listbox-for-tkinter/ <p style="color: grey"> Python recipe 580794 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/listbox/">listbox</a>, <a href="/recipes/tags/multicolumn/">multicolumn</a>, <a href="/recipes/tags/table/">table</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>This recipe makes easy to work a treeview widget like a table.</p> <p>It has several options for styling:</p> <ul> <li>heading_anchor</li> <li>heading_font</li> <li>heading_background</li> <li>heading_foreground</li> <li>cell_anchor</li> <li>cell_background</li> <li>cell_foreground</li> <li>cell_font</li> <li>cell_pady</li> <li>height</li> <li>padding</li> <li>adjust_heading_to_content</li> <li>stripped_rows</li> <li>headers</li> <li>selection_background</li> <li>selection_foreground</li> <li>field_background</li> </ul> <p>The "command" parameter is a callback and its called each time a row is selected.</p> Tkinter 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>