Mar-08-2020, 08:43 PM
Hello all, I have tried doing a bit of searching elsewhere and within this forum with various kselfey phrases/words for my issue and I am either not asking the right questions or I don't know so I have come here if you don't mind. I have only been learning tkinter just recently, but I know Python and PyQyt fairly well so I thought it was time to learn tkinter as well; always good to have choices.
In Ubuntu Linux in Gnome desktop I have simple test gui with a Frame and Button and I can set the window title just fine with a couple of ways with:
Any help/direction/comments is/are welcome.
Screenshot & code below:
![[Image: tkinter-test-problem.png]](https://i.postimg.cc/8cMypv4J/tkinter-test-problem.png)
Here's my code:
In Ubuntu Linux in Gnome desktop I have simple test gui with a Frame and Button and I can set the window title just fine with a couple of ways with:
self.winfo_toplevel().title('...')and
root.title('...')for example, but I can't figure out how to change the Gnome panel and docks text/title. I thought maybe I might have to set the Frame title it says it has no such attribute.
Any help/direction/comments is/are welcome.
Screenshot & code below:
![[Image: tkinter-test-problem.png]](https://i.postimg.cc/8cMypv4J/tkinter-test-problem.png)
Here's my code:
#!/usr/bin/env python3 from sys import exit from tkinter import (Button, Frame, Tk, PhotoImage) class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) # self.winfo_toplevel().title('Tkinter Test') self.pack(side="top") # selftest = Button(self, text="Text", command=lambda: prntw('Test')) selftest = Button(self, text="Text", command=lambda: self.winfo_toplevel().wm_state('iconic')) self.button_img = b'iVBORw0KGgoAAAANSUhEUgAAADAAAAAQCAYAAABQrvyxAAAABmJLR0QAMwCZAP/A\ AhXbAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5AMHFyY1F3JDrwAAAB1p\ VFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABbElEQVRIx92W\ vUuCURTGf97X7BqR72YYFUFDU0tfTuHQUKNjuNRW1J/Qn9HnlARtgVPUECTS0Ac2\ OAkNkuIgLVczuolIy6tIUcm7XO3ZLvcZnuecw3mOhy+wbXsBWAMiwATQj3lkgSQQ\ V0rdtX94vog/ADbobhwqpTa/GbBt+wJYNq0usLjN4HQUX3AK4RsAQBceqWYSlFO7\ TdqlUmqlZaAbKu+1RwnGjpFjMz9ydD5N6XSduiq0OuFxZv7WdOVHtq5+Fd9uori3\ 1HyGLSnlDjBremyG5mKddSoQolF74+P5HqAunG1jFIPTUbf8iHBWpVH4glNu+ROC\ HocAcqZF1EpZt/yccBLOKKqZhFt+UgBx0wbKqV10Pt0RV+fT7YEWt7TWRSnlsOlV\ +v50jRyfxxsI/RlkDV1pBtmRBaC1PpdShoFJUwYausLrwwmN2hvCbyP8ATxWX+uU\ UDf7vJxtN8VfKqVW/9cx16vn9CeHv4yHy0IdXgAAAABJRU5ErkJggg==' self.button_img = PhotoImage(data=self.button_img) selftest.config(image=self.button_img, relief='flat', overrelief='flat') selftest.pack(side="top") def prntw(args): print(args) def main(): root = Tk() root.title('Tkinter Test') app = Application(master=root) app.mainloop() if __name__ == '__main__': main() exit()