Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from fltk import *
- class window(Fl_Window):
- a = []
- b = []
- c = []
- d = []
- e = []
- f = []
- g = []
- h = []
- i = []
- one = []
- two = []
- three = []
- four = []
- five = []
- six = []
- seven = []
- eight = []
- nine = []
- sq = [a,b,c,d,e,f,g,h,i]
- sqr = [one,two,three,four,five,six,seven,eight,nine]
- box = []
- def __init__(self):
- Fl_Window.__init__(self, (1000)+60, (1000)+60, 'elmo')
- self.begin()
- for xpos in range(3):
- for ypos in range(3):
- for x in range(3):
- for y in range(3):
- self.sq[(xpos*ypos)-1].append(Fl_Input(xpos*160 + 50*x, ypos*160 + 50*y,50,50))
- but = Fl_Button(500,100,50,50)
- but.callback(self.check)
- def check(self,host):
- for x in range(9):
- for y in range(9):
- self.sqr[x-1].append(self.sq[x-1][y-1].value())
- print 'square one', one
- w = window()
- w.show()
- Fl.run()
- Fl_Input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement