M
myonov
Hi!
I need to disable resize button in Tkinter.
I inherit the Frame class. Then in the constructor i make my buttons,
labels, etc. Then I pack them and when move borders of the frame
everything changes it's location and it looks really bad. How can I
change that?
That's my code:
# -*- coding: cp1251 -*-
import Tkinter
class App(Tkinter.Frame):
def click(self):
pass
def click2(self):
pass
def __init__(self, master=None):
Tkinter.Frame.__init__(self, master, width = 700, height =
400,\
bg = "#999999")
self.pack()
# Buttons
self.b1 = Tkinter.Button(self, text = u"äÏÂÁ×É ëÎÉÇÁ",\
command=self.click, font = "Courier",
\
fg = "red")
self.b2 = Tkinter.Button(self, text = u"äÏÂÁ×É ÞÉÔÁÔÅÌ",\
command=self.click2, font = "Courier",
\
fg = "red")
self.b1.place(relx = 0.75, rely = 0.3)
self.b2.place(relx = 0.75, rely = 0.4)
# Labels
self.l1 = Tkinter.Label(self, font = "Courier", height = 4,\
text = u"éÎÆÏÒÍÁÃÉÑ", fg = "#ffffff",\
bg = "#999999")
self.l1.place(x = 275, y = 10)
# Text Control
# self.txt = Tkinter.Text(self, bg = "#124456", )
# self.txt.pack()
def main():
app = App()
app.mainloop()
if __name__ == "__main__": main()
I need to disable resize button in Tkinter.
I inherit the Frame class. Then in the constructor i make my buttons,
labels, etc. Then I pack them and when move borders of the frame
everything changes it's location and it looks really bad. How can I
change that?
That's my code:
# -*- coding: cp1251 -*-
import Tkinter
class App(Tkinter.Frame):
def click(self):
pass
def click2(self):
pass
def __init__(self, master=None):
Tkinter.Frame.__init__(self, master, width = 700, height =
400,\
bg = "#999999")
self.pack()
# Buttons
self.b1 = Tkinter.Button(self, text = u"äÏÂÁ×É ëÎÉÇÁ",\
command=self.click, font = "Courier",
\
fg = "red")
self.b2 = Tkinter.Button(self, text = u"äÏÂÁ×É ÞÉÔÁÔÅÌ",\
command=self.click2, font = "Courier",
\
fg = "red")
self.b1.place(relx = 0.75, rely = 0.3)
self.b2.place(relx = 0.75, rely = 0.4)
# Labels
self.l1 = Tkinter.Label(self, font = "Courier", height = 4,\
text = u"éÎÆÏÒÍÁÃÉÑ", fg = "#ffffff",\
bg = "#999999")
self.l1.place(x = 275, y = 10)
# Text Control
# self.txt = Tkinter.Text(self, bg = "#124456", )
# self.txt.pack()
def main():
app = App()
app.mainloop()
if __name__ == "__main__": main()