tkinter with wck

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric_Dexter@msn.com

    #1

    tkinter with wck

    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_repai r). 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(Wid get):

    def ui_handle_repai r(self, draw, x0, y0, x1, y1):
    black = self.ui_pen("bl ack", 5)

    # draw a black cross
    draw.line((x0, y0, x1, y1), black)
    draw.line((x0, y1, x1, y0), black)

    def ui_handle_resiz e(self, width,height):

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




    root = Tk()

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

    root.mainloop()

Working...