• Login or register

discuss.effbot.org

  • Popular
  • Recent
  • An Introduction to Tkinter (effbot.org)
    2 points by effbot 1 year ago
    • 10 comments
  • 1 point by python4life 17 days ago 1 child

    its amazing how people are able to come up with wrapper class by using already-built in tools, but they fail to fully comprehend the bigger picture. In this case, MultiListbox is supposed to represent a table with columns
    and rows. This class has bunch of functions and routines which are basically useless. However, one of the basic function you would expect in a table is updating each and every cell for each row. I've been beating my head
    against the wall trying to implement this routine. Still, for the life of me, I have not been able to get it working. If anyone out there can let me in on a solution for updating its rows real-time, I would appreciate it. Thanks.

    • link
    • reply
    • 1 point by effbot 12 days ago 0 children

      What MultiListbox is this? And why the confrontational style? Maybe the original author didn't have the same use case in mind as you have?

      • link
      • reply
  • 1 point by kwabena 1 month ago 0 children

    would somebody help to get the height of a Font?
    i got the width with measure as seen below but lost in the
    woods for the height.
    helv12 = tkFont.Font ( family="Helvetica", size=12 )
    width = helv12.measure(mytext)
    would you please help me
    thanks

    • link
    • reply
  • 2 points by Doug7000 4 months ago 0 children

    Is there a way of being able to paste text into an entry widget? Yes, Ctrl + V. I should have tried that first.

    • link
    • reply
  • 1 point by pam547 7 months ago 0 children

    In the "Tkinter Checkbutton widget" page : I needed how do using this widget. So we must ask "variablename".get() for an answer with an 0 or an 1.
    .get() is very great.
    Thanks for this work. Good continuation to you.

    • link
    • reply
  • 1 point by Marc Culler 9 months 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 1 year 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 1 year 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 1 year 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
  • 0 points by shank_nasa 2 months ago 0 children

    The Photoimage class discusses about inserting a jpg image. In that, there is one line that shows as
    label.image = image # keep a reference!

    This does not work. This line should be changed to
    label.image = photo # keep a reference!

    Kindly check this and change the article if needed. For me, if I place photo in that line, it displayed the image properly.

    Thanks for your work.

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