[Tutor] Tkinter iconbitmap question
Phil
phillor9 at gmail.com
Thu Jul 27 01:03:49 EDT 2023
I'm playing with an example from ttkbootstrap and I'm having a problem
with the iconbitmap function. I realise that .ico files are not
compatible with Linux so I've chosen an xbm file instead but I still
have the same error as follows:
root = tb.Window(themename="superhero")
# root = Tk()
root.title("TTK Bootstrap! DateEntry")
root.iconbitmap('wind.xbm')
root.geometry('500x350')
Traceback (most recent call last):
File
root.iconbitmap('wind.xbm')
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/tkinter/__init__.py", line 2136, in
wm_iconbitmap
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bitmap "wind.xbm" not defined
Wind.xbm is in the same virtual environment directory as the python file.
I've searched the Internet for an answer and found the same question but
no answers that makes much sense to me. It's not overly important. The
desktop manager that I use doesn't have window icons, perhaps it's just
an incompatibility problem?
--
Regards,
Phil
More information about the Tutor
mailing list