tkinter with wck

Eric_Dexter at msn.com Eric_Dexter at msn.com
Tue Jan 9 00:55:43 CET 2007


I am playing around with this code but I am having trouble getting my x
to be bigger it only seems to redraw when it becomes smaller than the
original size up to full size (in ui_handle_repair).  At other window
sizes it just seems to center it..  I tried playing around with resize
but never got that to do anything...  any ideas (I might be willing to
try other toolkits but the example looks very close to what I was
after)  http://www.dexrow.com

from Tkinter import Tk
from WCK import Widget

#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)

    def ui_handle_resize(self, width,height):

        black = self,ui_pen("black", 5)
        #draw.line((x0, y0, x1, y1), black)
        #draw.line((x0, y1, x1, y0), black)
        # center the text




root = Tk()

widget = CrossWidget(root)
widget.pack() #(expand=1, fill="both")

root.mainloop()




More information about the Python-list mailing list