.comment-link {margin-left:.6em;}

Monday, January 08, 2007

 

more on obsession with 3's

http://effbot.org/zone/wck-3.htm

The thing to note about the example is
a)The widget is cross because you broke his window.
b)you have to import tkinter. ((maybe blacklisted :) stopped working maybe because (he/she) thought breaking the window was funny
c) realy you want resize other wise it just changes when the window gets smaller..

I only notice this because of the obsession of my sources (more than one) with 3's and all the broken glass. To do it well you want to start with one.

from WCK import Widget
class CrossWidget(Widget):

def ui_handle_repair(self, draw, x0, y0, x1, y1):
black = self.ui_pen("black", 5) # draw a black cross
draw.line((x0, y0, x1, y1), black)
draw.line((x0, y1, x1, y0), black)

Labels: ,


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?