Top-rated recipes tagged "megawidget"http://code.activestate.com/recipes/tags/megawidget/top/2017-06-19T18:22:01-07:00ActiveState Code RecipesTag entry for Tkinter like Jquery Tag It (Python) 2017-04-07T12:30:13-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580734-tag-entry-for-tkinter-like-jquery-tag-it/ <p style="color: grey"> Python recipe 580734 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/tag/">tag</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 2. </p> <p>Tag editing widget for tkinter. It's similar to jQuery tag it: <a href="http://aehlke.github.io/tag-it/" rel="nofollow">http://aehlke.github.io/tag-it/</a></p> Pagination widget in Tkinter (Python) 2017-05-01T20:34:49-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580720-pagination-widget-in-tkinter/ <p style="color: grey"> Python recipe 580720 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/pagination/">pagination</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 24. </p> <p>I added here a pagination widget in tkinter with different styles.</p> <p>When this option <em>"hide_controls_at_edge"</em> is true, the widget hides <em>"next"</em>, <em>"previous"</em>, <em>"last"</em> and <em>"first"</em> buttons when they are not necessary. For example when pagination is at the first page then the buttons <em>"previous"</em> and <em>"first"</em> are not strictly necessary. Analogously when pagination is at the last page, the buttons <em>"last"</em> and <em>"next"</em> are not necessary because its not possible to go more forward.</p> <p>The user can customize the text of <em>"next"</em>, <em>"previous"</em>, <em>"last"</em> and <em>"first"</em> buttons. When some of these options is None, then the corresponding button is not showed: <em>prev_button</em>. <em>next_button</em>, <em>first_button</em>, <em>last_button</em></p> <p>The <em>"command"</em> option is a callback called every time a page is selected.</p> Sortable megawidget in tkinter (like the sortable widget in jquery UI) or draggable list (Python) 2017-03-03T14:11:42-08:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580717-sortable-megawidget-in-tkinter-like-the-sortable-w/ <p style="color: grey"> Python recipe 580717 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/draggable/">draggable</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/sortable/">sortable</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 13. </p> <p>Sortable element list for tkinter using drag and drop.</p> <p>This version use themed Tk. My other version doesn't use ttk:</p> <p><a href="https://code.activestate.com/recipes/580748-tkinter-draggable-list-v2/" rel="nofollow">https://code.activestate.com/recipes/580748-tkinter-draggable-list-v2/</a></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> Tkinter Datepicker (like the jQuery UI datepicker) (Python) 2017-06-19T18:22:01-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580725-tkinter-datepicker-like-the-jquery-ui-datepicker/ <p style="color: grey"> Python recipe 580725 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/calendar/">calendar</a>, <a href="/recipes/tags/datepicker/">datepicker</a>, <a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 18. </p> <p>It's based on ttkcalendar.py. But the internals are totally changed.I don't use for example the Treeview widget. I added more features also:</p> <ul> <li>On mouse over, the day label changes the background</li> <li>The selected day has an outstanding style</li> <li>Added support for many hotkeys</li> </ul> <p>These are the default bindings:</p> <ul> <li><p><em>Click button 1 on entry:</em> Show calendar</p></li> <li><p><em>Click button 1 outside entry and calendar:</em> Hide calendar</p></li> <li><p><em>Escape:</em> Hide calendar</p></li> <li><p><em>CTRL + PAGE UP:</em> Move to the previous month.</p></li> <li><p><em>CTRL + PAGE DOWN:</em> Move to the next month.</p></li> <li><p><em>CTRL + SHIFT + PAGE UP:</em> Move to the previous year.</p></li> <li><p><em>CTRL + SHIFT + PAGE DOWN:</em> Move to the next year.</p></li> <li><p><em>CTRL + LEFT:</em> Move to the previous day.</p></li> <li><p><em>CTRL + RIGHT:</em> Move to the next day.</p></li> <li><p><em>CTRL + UP:</em> Move to the previous week.</p></li> <li><p><em>CTRL + DOWN:</em> Move to the next week.</p></li> <li><p><em>CTRL + END:</em> Close the datepicker and erase the date.</p></li> <li><p><em>CTRL + HOME:</em> Move to the current month.</p></li> <li><p><em>CTRL + SPACE:</em> Show date on calendar</p></li> <li><p><em>CTRL + Return:</em> Set current selection to entry</p></li> </ul>