<html><P>I am using tkinter for this because it looks like most of what I need to build a code generator is in the example.&nbsp; I am having trouble resizing the x though.&nbsp; It only resizes when the window gets smaller and I need it resize regardless (and to be able to get the x,y of the bottom corner).&nbsp; With python 2.5 when the window gets bigger the example is just centered on the top and not redrawn.</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>from Tkinter import Tk<BR>from WCK import Widget</P>
<P>#from WCK import Widget</P>
<P>class CrossWidget(Widget):</P>
<P>&nbsp;&nbsp;&nbsp; def ui_handle_repair(self, draw, x0, y0, x1, y1):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; black = self.ui_pen("black", 5)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # draw a black cross<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; draw.line((x0, y0, x1, y1), black)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; draw.line((x0, y1, x1, y0), black)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; def ui_handle_resize(self, width, height):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.ui_damage()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #black = self,ui_pen("black", 5)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #draw.line((x0, y0, x1, y1), black)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #draw.line((x0, y1, x1, y0), black)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # center the text<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp;</P>
<P>root = Tk()</P>
<P>widget = CrossWidget(root)<BR>widget.pack() #(expand=1, fill="both")</P>
<P>root.mainloop()</P></html>