Open dregaladodiaz opened 3 years ago
Good morning, Sorry for the late response, Uh, that's strange... The touchbar normally changes when the window is focused, can you confirm the Tkinter window was on the front?
This is a simple "Hello World" program, it just shows a "Hello World!" label on the touchbar for an empty tkinter window:
from PyTouchBar import *
fen = Tk()
prepare_tk_windows(fen)
lbl = TouchBarItems.Label(text = "Hello World!")
set_touchbar([lbl])
fen.mainloop()
Hi, this example does not work for me too, I get a blank touchbar on python 3.10
EDIT: Found the solution, after I added a label or something to the TK window the Label on the touchbar showed up
from PyTouchBar import * fen = Tk() prepare_tk_windows(fen) lbl = TouchBarItems.Label(text = "Hello World!") set_touchbar([lbl]) fen.mainloop()
Using Python 3.8.2 and requirements.txt listed above it works me!, thanks @Maxmad68 . Hint: it didn't works with VSCode integrated terminal, use Terminal instead.
Good morning, Sorry for the late response, Uh, that's strange... The touchbar normally changes when the window is focused, can you confirm the Tkinter window was on the front?
This is a simple "Hello World" program, it just shows a "Hello World!" label on the touchbar for an empty tkinter window:
from PyTouchBar import * fen = Tk() prepare_tk_windows(fen) lbl = TouchBarItems.Label(text = "Hello World!") set_touchbar([lbl]) fen.mainloop()
Any ideas to force Tkinter window to be in front?
Any ideas to force Tkinter window to be in front?
I recall another thread from a while ago (different project) where it was concluded that this is not possible in mac OS. Not saying that it's actually impossible... but I wouldn't get your hopes up.
I ran
testTk()
function but my touch bar didn't change at all. Am I missing something? If there is simpler way to run a hello world example, please give me some directions.Hardware Complete MacBook Pro 16-Inch "Core i7" 2.6 2019 Specs
OSX
I just created a virtual environment an install following requirements requirements.txt
touchbar.py