Most viewed recipes tagged "style"http://code.activestate.com/recipes/tags/style/views/2017-04-13T23:48:27-07:00ActiveState Code RecipesMetro UI Tkinter (Python) 2017-04-13T23:48:27-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580729-metro-ui-tkinter/ <p style="color: grey"> Python recipe 580729 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/colors/">colors</a>, <a href="/recipes/tags/metro/">metro</a>, <a href="/recipes/tags/style/">style</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 20. </p> <p>I provide here some widgets with windows metro style: QuoteFrame, Metro_LabelFrame. Metro_Button, Container, Label_Container, Pagination.</p> <p>It's possible to provide an ID to the widgets, and then find the widget using the function <em>get_widget_by_ID</em>. </p> <p>Many widgets inherits the background from its container if this value is not provided.</p> <p>To inherit the background makes easy to create colored areas, instead of setting the same background color to every widget of the area.</p> unset engine in gtkrc; unset widget style in gtk (Python) 2009-07-13T06:51:51-07:00Dima Tisnekhttp://code.activestate.com/recipes/users/4068698/http://code.activestate.com/recipes/576840-unset-engine-in-gtkrc-unset-widget-style-in-gtk/ <p style="color: grey"> Python recipe 576840 by <a href="/recipes/users/4068698/">Dima Tisnek</a> (<a href="/recipes/tags/engine/">engine</a>, <a href="/recipes/tags/gtkp/">gtkp</a>, <a href="/recipes/tags/gtkrc/">gtkrc</a>, <a href="/recipes/tags/pixbuf/">pixbuf</a>, <a href="/recipes/tags/pygtk/">pygtk</a>, <a href="/recipes/tags/rc/">rc</a>, <a href="/recipes/tags/rcstyle/">rcstyle</a>, <a href="/recipes/tags/style/">style</a>, <a href="/recipes/tags/theme/">theme</a>). </p> <p>Example shows how to unset gtk engine'd look for a particular widget.</p> <p>gtk.Widget.modify_xx allows you to override simple properties, like backgrounds (unless theme uses an engine) and text color (sometimes (?)) gtkrc allows you to override most properties for all or selected widgets, like sizes, faces, and so on. some parts of widget appearance are set through engine stanzas in gtkrc, these can be unset too, if you know how...</p> <p>here it is!</p> Blocks for python (Python) 2011-10-24T22:26:07-07:00yoav glaznerhttp://code.activestate.com/recipes/users/4178625/http://code.activestate.com/recipes/577920-blocks-for-python/ <p style="color: grey"> Python recipe 577920 by <a href="/recipes/users/4178625/">yoav glazner</a> (<a href="/recipes/tags/block/">block</a>, <a href="/recipes/tags/lambda/">lambda</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/style/">style</a>). </p> <p>A simple <strong>block</strong> function that lets one send multi line blocks of code to a function it doesn't really act like a <em>normal</em> def/lambda but offers cool style</p> McCarthy's amb operator in Python (Python) 2010-08-23T22:41:53-07:00Paddy McCarthyhttp://code.activestate.com/recipes/users/398009/http://code.activestate.com/recipes/577368-mccarthys-amb-operator-in-python/ <p style="color: grey"> Python recipe 577368 by <a href="/recipes/users/398009/">Paddy McCarthy</a> (<a href="/recipes/tags/declarative/">declarative</a>, <a href="/recipes/tags/style/">style</a>). </p> <p>From reading about amb it seems that it allows for a declaritive style of programming where the one amb "operator" can * Set the ranges of variables * Set a constraint function * And iterate over all solutions </p> <p>(See <a href="http://paddy3118.blogspot.com/2010/08/mccarthys-amb-operator-in-python.html" rel="nofollow">http://paddy3118.blogspot.com/2010/08/mccarthys-amb-operator-in-python.html</a> for a more descriptive intro).</p>