1

I want to set the title of my tkinter application using iconbitmap but I am getting an error:-

Traceback (most recent call last):
  File "c:\Users\prajval\Desktop\Am_pm\main.py", line 700, in <module>
    root.iconbitmap('image\\inventory.ico')
  File "C:\Users\prajval\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 2080, in wm_iconbitmap
    return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "image\inventory.ico" not defined
acw1668
  • 40,144
  • 5
  • 22
  • 34
prajval
  • 11
  • 1
  • According to the documentation, if you are trying to use a file you must preceded the filename with `@`. Have you tried that? Also, you probably need to use a raw string or forward slashes. – Bryan Oakley Jul 13 '21 at 20:00

1 Answers1

0

iconbitmap is to set the icon of the application you can set the title by root.title("window_name") And if you show your code then it would be easy to tell the problem.

Sahil
  • 3
  • 5