bg = Bigraph() tg = Trigraph() # bg._print(bg._bigrph1) # bg._print(bg._bigrph2) stack = Stack() canvHeight = 400 canvWidth = 800 gv._canHt = canvHeight gv._canWdth = canvWidth txtBxWidth = canvWidth / 20 txtBxHeight = 1 gv._canvas = Canvas(root, height=canvHeight, width=canvWidth, bg="yellow") gv._canvas.grid(row=2, column=1) # why doesn't tag work? # gv._txtBox = Text(root,width=txtBxWidth,height=txtBxHeight,padx=5,pady=5,insertofftime=250,takefocus=1,tags='txtBox') gv._txtBox = Text( root, width=txtBxWidth, height=txtBxHeight, padx=5, pady=5, insertofftime=250, takefocus=1, font="Courier 32 bold" ) gv._txtBox.grid(row=1, column=1) gv._txtBox.focus() start() # testing # test_interface() root.mainloop()
################------------------python main---------------######## root = Tk() gv = GlobalVariables() bg = Bigraph() #bg._print(bg._bigrph1) #bg._print(bg._bigrph2) stack = Stack() canvHeight = 400 canvWidth = 800 gv._canHt = canvHeight gv._canWdth = canvWidth txtBxWidth = canvWidth / 8 txtBxHeight = 1 gv._canvas = Canvas(root,height=canvHeight,width=canvWidth,bg='yellow') gv._canvas.grid(row=2,column=1) gv._txtBox = Text(root,width=txtBxWidth,height=txtBxHeight,padx=5,pady=5,insertofftime=250,takefocus=1) gv._txtBox.grid(row=1,column=1) gv._txtBox.focus() start() #testing #test_interface() root.mainloop()
bg = Bigraph() s = 50 x = 200 y = 200 r1 = 110 #radius of center circle max_r2 = 80 #gv._circleList = [] stack = [] gv._canvas = Canvas(root,height=400,width=400,bg='yellow') gv._canvas.grid(row=2,column=1) #gv._canvas.focus_set() gv._txtBox = Text(root,width=50,height=1,padx=5,pady=5,insertofftime=250,takefocus=1) gv._txtBox.grid(row=1,column=1) gv._txtBox.focus() #gv._txtBox.insert(INSERT,"hello") #print "hilite", gv._highlighted #print "num steps:", gv._ttlNumSteps gv._currProbs = bg._prior set_layout() draw_interface(x,y,r1,max_r2) #testing #test_interface(gv._highlighted,gv._circleList,gv._txtBox) #grab keyboard input getKeyIn()