Discussion:
[Tkinter-discuss] Labels with no background
Bradley Hintze
2010-06-09 14:36:30 UTC
Permalink
Hi, I'm trying to get a label in a canvas without a background. is
this possible. Currently it defaults to white.
--
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799
Dan Halbert
2010-06-09 14:58:15 UTC
Permalink
Post by Bradley Hintze
Hi, I'm trying to get a label in a canvas without a background. is
this possible. Currently it defaults to white.
Do you really need a label, or could you just use a Canvas text object (create_text())? Those do not have a background. My impression is that widgets with transparent backgrounds is a hard problem, and are not generally available in Tk.

Dan
Bradley Hintze
2010-06-14 19:01:41 UTC
Permalink
create_text() moves with the 'scroll' of the canvas where as label
does not which is a functionality that I need.

Bradley
Post by Dan Halbert
Post by Bradley Hintze
Hi, I'm trying to get a label in a canvas without a background. is
this possible. Currently it defaults to white.
Do you really need a label, or could you just use a Canvas text object (create_text())? Those do not have a background. My impression is that widgets with transparent backgrounds is a hard problem, and are not generally available in Tk.
Dan
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss at python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
--
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799
Tim Jones
2010-06-14 19:27:18 UTC
Permalink
Post by Bradley Hintze
create_text() moves with the 'scroll' of the canvas where as label
does not which is a functionality that I need.
Bradley,

What if you place your text into a small, empty canvas and then place that small canvas on top of your main canvas (basically creating your own label)?

Tim
Bradley Hintze
2010-06-14 20:19:04 UTC
Permalink
Great Idea. Thanks!
Post by Tim Jones
Post by Bradley Hintze
create_text() moves with the 'scroll' of the canvas where as label
does not which is a functionality that I need.
Bradley,
What if you place your text into a small, empty canvas and then place that small canvas on top of your main canvas (basically creating your own label)?
Tim
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss at python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
--
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799
Loading...