[Tkinter-discuss] Possible to stack frames with frame transparency? (create widget w/gradient background)
igor.e.novikov at gmail.com
Wed Nov 3 22:51:08 CET 2010
On Wed, Nov 3, 2010 at 11:50 PM, Igor Novikov <igor.e.novikov at gmail.com>wrote:
> On Wed, Nov 3, 2010 at 8:55 PM, <python at bdurham.com> wrote:
>> New to Tkinter: Is it possible to stack frames on top of one another and
>> if so, can frames have transparency?
>> My goal is to create widgets with gradient backgrounds. I was hoping I
>> could do this by placing an image in a frame and then placing an identical
>> sized frame over this image frame. This on-top frame would contain all my
>> child widgets.
>> Details: Is it possible to place a frame on top of an image background?
>> From my reading, the only way to do this appears to be to use a Canvas as my
>> container (vs. a Frame). The downside to using a canvas appears to be that
>> Labels do not have transparent backgrounds so any text I place in such a
>> (canvas based) container must be placed with Canvas.create_text() vs. laid
>> out via one of the pack/grid/place layout managers. Am I understanding this
>> Thank you,
>> Tkinter-discuss mailing list
>> Tkinter-discuss at python.org
> I think this could be helpful for you:
> This is tkCairo extension in work. You can find the code in our repository:
> tkCairo is modified pycairo project for tk widgetset. So you can use
> pycairo docs
> as a cairo command reference. Please note we have implemented Linux support
> But this extension can be easy adopted for win32.
> Concerning tk Frame stacking you can try using place() manager. All tk
> widgets are
> native windows without WM decorations. So you can apply all toplevel
> to widgets if they managed by place() manager.
> Igor Novikov
> sK1 Project
Small addition: tkCairo allows drawing on regular tk Frame widget and you
can pack in this
Frame any other child widget (on screenshot tk Button is packed into such
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tkinter-discuss