1

example screenI am creating a Lyrics display app in Tkinter and python for Ubuntu. It works fine in displaying lyrics in a window. but I want to create a on screen presentation of lyrics lines like it happens in MiniLyrics. So I want to draw over all windows and that should with click through and have transparent background. what strategy I should use to achieve this task.

Vishvendra Singh
  • 195
  • 2
  • 13
  • This question is quite broad. Stack Overflow is better suited for narrower questions, which usually show some code. There's a great page on writing good questions: [ask]. To help you with the question you have, look at [this question](http://stackoverflow.com/q/21840133/3714930) and its answers to learn about showing text without background using Tkinter. – fhdrsdg Jan 21 '15 at 14:05
  • You mention tkinter in your question, but gtk in the tags. Why is that? Are you trying to combine gtk and tkinter? Are you wanting to switch from gtk to tkinter? – Bryan Oakley Jan 23 '15 at 11:58
  • @BryanOakley you got it. If needed I am ready to switch to gtk. because Tkinter is limited in functionality. – Vishvendra Singh Jan 23 '15 at 12:04

1 Answers1

2

You cannot use tkinter to do what you want. Tkinter can only affect the windows it creates.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • To add to the answer, while you could theoretically try to do this with some X library or within the compositor, this is very advanced (if it's even possible, as it poses all sorts of issues); you're better off just taking advantage of a visualization or plugin system provided by your media player of choice. I wouldn't know what, though. And that assumes you want it to behave like MiniLyrics; when you say "draws over all windows" that sounds more like a (desktop environment-specific) desktop applet or something. Your description isn't clear enough. – andlabs Jan 22 '15 at 06:57
  • @andlabs hey dude I refer drawing cause I find out that cairo can do this. cairo is actually a drawing library so I guess there may be someone out there who can tell me logic behind this. – Vishvendra Singh Jan 23 '15 at 07:40
  • Yes, cairo is a vector graphics drawing library in that it provides the algorithms that comprise the how of vector graphics (for instance, it has a function that will draw a circle) and is able to draw vector graphics onto a variety of devices, buffers, surfaces, etc. (for instance, it can produce a SVG file of the circle). However, it does not by itself do what you want. You need to have a place to draw to if you want to draw on screen; cairo doesn't provide that. Could you please provide a mockup screenshot describing exactly what you want to do? That would help explain yourself much better. – andlabs Jan 23 '15 at 07:52