You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently using azure theme azure.tcl, and swapped it for this. Cannot get it to work no matter what I try. I have it in the root directory of the python script, with folders theme > forest_light. I get this error:
_tkinter.TclError: no files matched glob pattern "*.png"
Python code:
```
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
# Get the path to the directory where the script is located
script_dir = os.path.dirname(os.path.abspath(__file__))
# Build the full path to the forest-light.tcl file
tcl_path = os.path.join(script_dir, "forest-light.tcl")
# Create the root window
root = tk.Tk()
root.title("windowtitle")
# Pack a big frame so, it behaves like the window background
big_frame = ttk.Frame(root)
big_frame.pack(fill="both", expand=True)
# Create a style
style = ttk.Style(root)
# Import the forest-light.tcl file using the full path
root.tk.call("source", tcl_path)
# Set the theme with the theme_use method
style.theme_use("forest-light")
# Create the main notebook
main_notebook = ttk.Notebook(big_frame)
main_notebook.pack(fill=tk.BOTH, expand=True)
# Create the desktop view frame
desktop_view = tk.Frame(main_notebook)
main_notebook.add(desktop_view, text="Desktop")
# Create the mobile view frame
mobile_view = tk.Frame(main_notebook)
main_notebook.add(mobile_view, text="Mobile")
# Create the menu bar
menubar = tk.Menu(root)
root.config(menu=menubar)
```
Appears that even the example.py doesn't work from downloading the entire forest-ttk folder:
_File "c:\Users\josep\Downloads\Forest-ttk-theme-master\Forest-ttk-theme-master\example.py", line 29, in
root.tk.call("source", "forest-dark.tcl") tkinter.TclError: couldn't read file "forest-dark.tcl": no such file or directory
The text was updated successfully, but these errors were encountered:
Currently using azure theme azure.tcl, and swapped it for this. Cannot get it to work no matter what I try. I have it in the root directory of the python script, with folders theme > forest_light. I get this error:
_tkinter.TclError: no files matched glob pattern "*.png"
Python code:
Appears that even the example.py doesn't work from downloading the entire forest-ttk folder:
_File "c:\Users\josep\Downloads\Forest-ttk-theme-master\Forest-ttk-theme-master\example.py", line 29, in
root.tk.call("source", "forest-dark.tcl")
tkinter.TclError: couldn't read file "forest-dark.tcl": no such file or directory
The text was updated successfully, but these errors were encountered: