Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. from fltk import *
  2.  
  3. class window(Fl_Window):
  4. a = []
  5. b = []
  6. c = []
  7. d = []
  8. e = []
  9. f = []
  10. g = []
  11. h = []
  12. i = []
  13. one = []
  14. two = []
  15. three = []
  16. four = []
  17. five = []
  18. six = []
  19. seven = []
  20. eight = []
  21. nine = []
  22. sq = [a,b,c,d,e,f,g,h,i]
  23. sqr = [one,two,three,four,five,six,seven,eight,nine]
  24. box = []
  25. def __init__(self):
  26. Fl_Window.__init__(self, (1000)+60, (1000)+60, 'elmo')
  27. self.begin()
  28. for xpos in range(3):
  29. for ypos in range(3):
  30. for x in range(3):
  31. for y in range(3):
  32. self.sq[(xpos*ypos)-1].append(Fl_Input(xpos*160 + 50*x, ypos*160 + 50*y,50,50))
  33.  
  34. but = Fl_Button(500,100,50,50)
  35.  
  36. but.callback(self.check)
  37.  
  38. def check(self,host):
  39. for x in range(9):
  40.  
  41. for y in range(9):
  42. self.sqr[x-1].append(self.sq[x-1][y-1].value())
  43. print 'square one', one
  44.  
  45. w = window()
  46. w.show()
  47. Fl.run()
  48. Fl_Input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement