Re: Clipboard Monitor (tkinter,windows)

Discussion in 'Python' started by Gabriel Genellina, Aug 24, 2007.

  1. En Fri, 24 Aug 2007 06:35:05 -0300, Peter Sutton
    <> escribi�:

    > Hi. I am an A-level student studying computer science. I have taken it
    > upon myself to learn python. It is now my weapon of choice. I have had a
    > problem trying to creating a clipboard monitor in Windows(XP,Vista) that
    > is linked to a tkinter GUI. I have a perfectly good code for clipboard
    > monitoring, but as soon as it is linked to a tkinter gui, the gui locks
    > when a WM.DRAWCLIPBOARD message is recieved. I am at the point of giving
    > up. If anyone can help or offer an alternative...that is not
    > polling....I would be very happy. Thanks. Peter


    Removing this line:
    self.l["text"] = "Lord be Praised"
    and it works fine.
    I'm not a Tk expert but I think it doesn't like sending another message
    from inside a message handler.

    I'd try to decouple both actions; inside OnDrawClipboard just save the
    clipboard contents in an instance attribute, and then invalidate the
    window; show the contents on response to wm_paint messages.

    --
    Gabriel Genellina
    Gabriel Genellina, Aug 24, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    753
  2. Dan Bishop
    Replies:
    0
    Views:
    216
    Dan Bishop
    Aug 26, 2008
  3. Replies:
    4
    Views:
    253
    Randy Webb
    Dec 14, 2004
  4. Mahsha

    Clipboard - Copy Image To Clipboard

    Mahsha, Jun 1, 2009, in forum: Javascript
    Replies:
    1
    Views:
    563
    Thomas 'PointedEars' Lahn
    Jun 1, 2009
  5. Mahsha

    Clipboard - Copy Text To Clipboard

    Mahsha, Jun 1, 2009, in forum: Javascript
    Replies:
    3
    Views:
    634
    Thomas 'PointedEars' Lahn
    Jun 1, 2009
Loading...

Share This Page