Editor.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #! /usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. """
  4. This file is part of librelight.
  5. librelight is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 2 of the License, or
  8. (at your option) any later version.
  9. librelight is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with librelight. If not, see <http://www.gnu.org/licenses/>.
  15. (c) 2012 micha.rathfelder@gmail.com
  16. """
  17. import time
  18. import tkinter
  19. import sys
  20. import _thread as thread
  21. import tkinter as tk
  22. root = tk.Tk()
  23. frame = tk.Frame(root)
  24. frame.pack(fill=tk.X, side=tk.TOP)
  25. data = []
  26. i=0
  27. for r in range(3):
  28. frame.columnconfigure(r, weight=1)
  29. cd = []
  30. for c in range(8):
  31. i+=1
  32. frame.columnconfigure(c, weight=1)
  33. b = tk.Button(frame,bg="red", text='MH'+str(i)+' r:'+str(r+1)+' c:'+str(c+1))
  34. b.grid(row=r, column=c, sticky=tk.W+tk.E)
  35. cd.append(b)
  36. frame = tk.Frame(root)
  37. frame.pack(fill=tk.X, side=tk.TOP)
  38. data = []
  39. i=0
  40. for c in range(8):
  41. frame.columnconfigure(c, weight=1)
  42. cd = []
  43. for r in range(3):
  44. i+=1
  45. frame.columnconfigure(r, weight=1)
  46. b = tk.Button(frame,bg="green", text='PAN'+str(i)+' r:'+str(r+1)+' c:'+str(c+1))
  47. b.grid(row=r, column=c, sticky=tk.W+tk.E)
  48. cd.append(b)
  49. frame = tk.Frame(root)
  50. frame.pack(fill=tk.X, side=tk.TOP)
  51. data = []
  52. for c in range(10):
  53. frame.columnconfigure(c, weight=1)
  54. cd = []
  55. for r in range(10):
  56. frame.columnconfigure(r, weight=1)
  57. b = tk.Button(frame, text='r:'+str(r+1)+' c:'+str(c+1))
  58. b.grid(row=r, column=c, sticky=tk.W+tk.E)
  59. cd.append(b)
  60. frame = tk.Frame(root)
  61. frame.pack(fill=tk.X, side=tk.TOP)
  62. data = []
  63. for c in range(3):
  64. frame.columnconfigure(c, weight=1)
  65. cd = []
  66. for r in range(3):
  67. frame.columnconfigure(r, weight=1)
  68. b = tk.Button(frame,bg="grey", text='r:'+str(r+1)+' c:'+str(c+1))
  69. b.grid(row=r, column=c, sticky=tk.W+tk.E)
  70. cd.append(b)
  71. root.mainloop()