By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

tkinter with wck

P: n/a
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()

Jan 9 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.