Advertisement
ALEXANDAR_GEORGIEV

verticaly_text

Jul 25th, 2022
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 10.67 KB | None | 0 0
  1. from tkinter import *
  2. from tkinter.font import Font
  3.  
  4.  
  5.  
  6. root=Tk()
  7. root.geometry('1300x400+400+200')
  8.  
  9. #font = Font.config("Times")    # flat, groove, raised, ridge, solid, or sunken,,, left, right, or center
  10. can0 = Canvas(root, height=207, width=155, background='SystemButtonFace', borderwidth=10, relief='flat', border=10, bd=0, highlightbackground='black', highlightthickness=1, insertborderwidth=10, insertbackground='green', selectbackground='green', selectborderwidth=20)
  11. str0 = can0.create_text(80,120, text='ПОКАЗАТЕЛИ', angle=0, anchor='center', fill=None, font='Times, 10', justify='center')
  12. can0.grid(row=0, column=0, padx=(20,0), pady=(20,0), rowspan=2)    # n, ne, e, se, s, sw, w, nw, or center
  13.  
  14. can1 = Canvas(root, height=25, width=348, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=(1), highlightcolor='red')
  15. str1 = can1.create_text(180,12.5, text='Отчетна стойност на нетекущите активи', angle=0, anchor='center', fill=None, font='Times, 10', justify='center')
  16. can1.grid(row=0, column=1, padx=0, pady=(20, 0), columnspan=7)    # n, ne, e, se, s, sw, w, nw, or center
  17.  
  18. can2 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  19. str2 = can2.create_text(25,72, text='В началото на\nпериода', angle=90, anchor='e', fill=None, font='Times, 10', justify='left')
  20. can2.grid(row=1, column=1)    # n, ne, e, se, s, sw, w, nw, or center
  21.  
  22. can3 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  23. str3 = can3.create_text(25,72, text='На постъпилите\nпрез периода', angle=90, anchor='e', fill=None, font='Times, 10')
  24. can3.grid(row=1, column=2)    # n, ne, e, se, s, sw, w, nw, or center
  25.  
  26. can4 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  27. str4 = can4.create_text(4,85, text='На излезлите\nпрез периода', angle=90, anchor='n', fill=None, font='Times, 10')
  28. can4.grid(row=1, column=3)    # n, ne, e, se, s, sw, w, nw, or center
  29.  
  30. can5 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  31. str5 = can5.create_text(4,90, text='В края на\nпериода (1+2-3)', angle=90, anchor='n', fill=None, font='Times, 10')
  32. can5.grid(row=1, column=4)    # n, ne, e, se, s, sw, w, nw, or center
  33.  
  34. can6 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  35. str6 = can6.create_text(4,100, text='Последваща оценка\nв увеличение', angle=90, anchor='n', fill=None, font='Times, 10')
  36. can6.grid(row=1, column=5)    # n, ne, e, se, s, sw, w, nw, or center
  37.  
  38. can7 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  39. str7 = can7.create_text(4,100, text='Последваща оценка\nв намаление', angle=90, anchor='n', fill=None, font='Times, 10')
  40. can7.grid(row=1, column=6)    # n, ne, e, se, s, sw, w, nw, or center
  41.  
  42. can8 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='green', highlightthickness=1)
  43. str8 = can8.create_text(4,110, text='Преоценена стойност\n(4+5-6)', angle=90, anchor='n', fill=None, font='Times, 10')
  44. can8.grid(row=1, column=7)    # n, ne, e, se, s, sw, w, nw, or center
  45.  
  46. can9 = Canvas(root, height=25, width=348, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  47. str9 = can9.create_text(200,12.5, text='Амортизация', angle=0, anchor='center', fill=None, font='Timesbd, 10', justify='center')
  48. can9.grid(row=0, column=8, padx=0, pady=(20, 0), columnspan=7)    # n, ne, e, se, s, sw, w, nw, or center
  49.  
  50. can10 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  51. str10 = can10.create_text(4,1, text='В началото на\nпериода', angle=90, anchor='ne', fill=None, font='Times, 10')
  52. can10.grid(row=1, column=8)    # n, ne, e, se, s, sw, w, nw, or center
  53.  
  54. can11 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  55. str11 = can11.create_text(4,85, text='На постъпилите\nпрез периода', angle=90, anchor='n', fill=None, font='Times, 10')
  56. can11.grid(row=1, column=9)    # n, ne, e, se, s, sw, w, nw, or center
  57.  
  58. can12 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  59. str12 = can12.create_text(4,85, text='На излезлите\nпрез периода', angle=90, anchor='n', fill=None, font='Times, 10')
  60. can12.grid(row=1, column=10)    # n, ne, e, se, s, sw, w, nw, or center
  61.  
  62. can13 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  63. str13 = can13.create_text(4,90, text='В края на\nпериода (1+2-3)', angle=90, anchor='n', fill=None, font='Times, 10')
  64. can13.grid(row=1, column=11)    # n, ne, e, se, s, sw, w, nw, or center
  65.  
  66. can14 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  67. str14 = can14.create_text(4,100, text='Последваща оценка\nв увеличение', angle=90, anchor='n', fill=None, font='Times, 10')
  68. can14.grid(row=1, column=12)    # n, ne, e, se, s, sw, w, nw, or center
  69.  
  70. can15 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  71. str15 = can15.create_text(4,100, text='Последваща оценка\nв намаление', angle=90, anchor='n', fill=None, font='Times, 10')
  72. can15.grid(row=1, column=13)    # n, ne, e, se, s, sw, w, nw, or center
  73.  
  74. can16 = Canvas(root, height=180, width=48, background='white', borderwidth=0, relief='flat', highlightbackground='blue', highlightthickness=1)
  75. str16 = can16.create_text(4,90, text='Преоценена амортизация в\n края на периода (11+12-13)', angle=90, anchor='n', fill=None, font='Times, 10', justify='left')
  76. can16.grid(row=1, column=14)    # n, ne, e, se, s, sw, w, nw, or center
  77.  
  78. can18 = Canvas(root, height=207, width=53, background='white', borderwidth=0, relief='flat', highlightbackground='black', highlightthickness=1)
  79. str18 = can18.create_text(2,140, text='Балансова стойност\nв края на периода\n(7-14)', angle=90, anchor='n', fill=None, font='Times, 10', justify='left')
  80. can18.grid(row=0, column=15, padx=(0,20), pady=(20,0), rowspan=2)    # n, ne, e, se, s, sw, w, nw, or center
  81.  
  82. # tex1 = Text(root, bg='white', height=3, width=29, font='Times, 10')
  83. # tex1.insert(END, '  2. Концесии, патенти, търговски марки, програмни продукти и други подобни права и активи')
  84. # tex1.grid(row=2, column=0, padx=(20, 0))
  85. #
  86. # tex2 = Text(root, bg='white', height=1, width=12, font='Times, 10')
  87. # tex2.insert(END, '12 999,32')
  88. # tex2.grid(row=2, column=1, padx=(20, 0))
  89.  
  90. lab = Label(root, text='  2. Концесии, патенти, търговски\nмарки, програмни продукти\nи други подобни права и активи', font="Timesbg, 7", justify='left', bg='lightgrey', width=25, height=3)
  91. lab.grid(row=2, column=0, padx=(20, 0))
  92. # flat, groove, raised, ridge, solid, or sunken
  93. lab2 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  94. lab2.grid(row=2, column=1, padx=(0, 0))
  95.  
  96. lab3 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  97. lab3.grid(row=2, column=2, padx=(0, 0))
  98.  
  99. lab4 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  100. lab4.grid(row=2, column=3, padx=(0, 0))
  101.  
  102. lab5 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  103. lab5.grid(row=2, column=4, padx=(0, 0))
  104.  
  105. lab6 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  106. lab6.grid(row=2, column=5, padx=(0, 0))
  107.  
  108. lab7 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  109. lab7.grid(row=2, column=6, padx=(0, 0))
  110.  
  111. lab8 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  112. lab8.grid(row=2, column=7, padx=(0, 0))
  113.  
  114.  
  115. lab9 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  116. lab9.grid(row=2, column=8, padx=(0, 0))
  117.  
  118. lab10 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  119. lab10.grid(row=2, column=9, padx=(0, 0))
  120.  
  121. lab11 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  122. lab11.grid(row=2, column=10, padx=(0, 0))
  123.  
  124. lab12 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  125. lab12.grid(row=2, column=11, padx=(0, 0))
  126.  
  127. lab13 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  128. lab13.grid(row=2, column=12, padx=(0, 0))
  129.  
  130. lab14 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  131. lab14.grid(row=2, column=13, padx=(0, 0))
  132.  
  133. lab15 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=7, height=3)
  134. lab15.grid(row=2, column=14, padx=(0, 0))
  135.  
  136. lab16 = Label(root, text='\n12 005.23\n', font="Timesbg, 7", justify='right', bg='white', width=8, height=3)
  137. lab16.grid(row=2, column=15, padx=(0,20), pady=(0,0))
  138. # lab1 = Label(root, text='ПОКАЗАТЕЛИ', wraplength=0)
  139. # lab1.grid(row=0, column=0)
  140. #
  141. # lab2 = Label(root, text='Отчетна стойност на нетекущите активи', wraplength=0)
  142. # lab2.grid(row=0, column=(7))
  143. #
  144. # lab3 = Label(root, text='В началото на периода', wraplength=1)
  145. # lab3.grid(row=1, column=2)
  146. #
  147. # lab4 = Label(root, text='На постъпилите през периода', wraplength=1)
  148. # lab4.grid(row=1, column=3)
  149.  
  150. # canvas=Canvas()
  151. # canvas.create_window(root, width=100, height=100, )
  152. # canvas.pack()
  153. #
  154. # ver_text = canvas.create_text(100, 100, text='Rotated Text', angle=90)
  155.  
  156. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement