• Login or register

discuss.effbot.org

  • Popular
  • Recent
  • An Introduction to Tkinter (effbot.org)
    2 points by effbot 11 months ago
    • 4 comments
  • 1 point by Marc Culler 1 month ago 0 children

    Something that is obviously useful is to be able to find the attributes of the font that is currently being used by a widget. It is not obvious from the description here how one does that. The answer, discovered by painful experimentation and reading source code, is:
    tkFont.Font(font=widget.cget('font')).actual()
    It would be helpful to include that as one of your "patterns".

    • link
    • reply
  • 1 point by Ralph Corderoy 4 months ago 1 child

    It's good that http://effbot.org/tkinterbook/photoimage.htm has the note about having to keep a reference. I found the page after fathoming out what the problem was myself, and therefore knowing what to Google for. Could the note be extended to explain why the reference Tk must be keeping to the image isn't sufficient?

    • link
    • reply
    • 1 point by effbot 4 months ago 0 children

      That assumes that I can figure out why Tk behaves that way :-). If I remember correctly, the library does indeed keep the internal image object around, since it's being displayed, but it explicitly clears the content when Tkinter releases it.

      • link
      • reply
  • 1 point by solarblast 5 months ago 0 children

    This is a very good site, but I'd sure like to see this as a pdf file. It would make it a lot easier to search.

    • link
    • reply
  • Widget
  • Recent Comments
  • Leaders
Powered by