Popular Python recipes tagged "ttk"http://code.activestate.com/recipes/langs/python/tags/ttk/2017-06-13T18:54:02-07:00ActiveState Code Recipes[python3-tk/ttk] Onager Scratchpad (Python) 2016-04-24T02:34:03-07:00Mickey Kocichttp://code.activestate.com/recipes/users/4193984/http://code.activestate.com/recipes/580650-python3-tkttk-onager-scratchpad/ <p style="color: grey"> Python recipe 580650 by <a href="/recipes/users/4193984/">Mickey Kocic</a> (<a href="/recipes/tags/python3/">python3</a>, <a href="/recipes/tags/text_processing/">text_processing</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/ttk/">ttk</a>, <a href="/recipes/tags/windows/">windows</a>). Revision 2. </p> <p>I wrote this simple text editor to use for my diary. It's customized the way I like it, but the code is set up so it's easy for other people to change bg, fg, font, etc. I've also compiled a standalone Windows executable (thank you very much ActiveState! without ActivePython the compilation would have been impossible). Anyone who wants a copy of the executable is free to message or email me.</p> <p>NOTE: If you get an error that the theme is not recognized, just comment out line 18 or run the following code in your python3 interpreter:</p> <pre class="prettyprint"><code>&gt;&gt;&gt;from tkinter.ttk import Style &gt;&gt;&gt;s = Style() &gt;&gt;&gt;s.theme_use() </code></pre> <p>You'll get a list of the available themes and can replace the 'alt' in line 18 with any one of them you want.</p> Using Tkinter's Invoke Method for testing (Python) 2017-06-13T18:54:02-07:00Stephen Rigdenhttp://code.activestate.com/recipes/users/4191139/http://code.activestate.com/recipes/578978-using-tkinters-invoke-method-for-testing/ <p style="color: grey"> Python recipe 578978 by <a href="/recipes/users/4191139/">Stephen Rigden</a> (<a href="/recipes/tags/invoke/">invoke</a>, <a href="/recipes/tags/mainloop/">mainloop</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/ttk/">ttk</a>, <a href="/recipes/tags/unittest/">unittest</a>, <a href="/recipes/tags/unittests/">unittests</a>). </p> <p>This recipe shows a skeleton unittest fixture that calls a widget's command using <code>invoke</code> without starting tkinter's mainloop. (Tcl8.6.3/Tk8.6.3.)</p>