Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Adding the Copy Property to a Simple Histogram
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
W. eWatson  
View profile  
 More options Jul 5, 9:48 pm
Newsgroups: comp.lang.python
From: "W. eWatson" <notval...@sbcglobal.net>
Date: Sun, 05 Jul 2009 18:48:46 -0700
Local: Sun, Jul 5 2009 9:48 pm
Subject: Adding the Copy Property to a Simple Histogram
The code below produces a text window 60hx20w with a scroll bar. The
contents are something of a histogram of values from 0 to 255. If one tries
to copy the contents, Windows doesn't allow it. What needs to be done to
allow a copy and paste?

     def ShowHistogram(self):
         if not self.current_image:
             return

         if self.histogram:
             self.histogram.destroy()

         t = Toplevel( self.master )
         t.title("Histogram")
         t.bind( '<Destroy>', self.DestroyHistogram )
         text = Text( t, height=60, width=20 )
         scroll = Scrollbar(t, command=text.yview)
         text.configure(yscrollcommand=scroll.set)
         text.pack(side=LEFT, fill='both', expand=1)
         scroll.pack(side=RIGHT, fill=Y)
         self.histogram = t

         hist = self.current_image.histogram()
         for i in range(len(hist)):
             msg = "%5d %6d\n" % (i,hist[i])
             text.insert( END, msg )
--
                                W. eWatson

              (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
               Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

                     Web Page: <www.speckledwithstars.net/>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Forman  
View profile  
 More options Jul 5, 11:11 pm
Newsgroups: comp.lang.python
From: Simon Forman <sajmik...@gmail.com>
Date: Sun, 5 Jul 2009 20:11:51 -0700 (PDT)
Local: Sun, Jul 5 2009 11:11 pm
Subject: Re: Adding the Copy Property to a Simple Histogram
On Jul 5, 9:48 pm, "W. eWatson" <notval...@sbcglobal.net> wrote:

Do you mean that the Text widget doesn't let you copy-and-paste copy
its contents using selection and <Control-c>?  That shouldn't have
anything to do with the contents of the Text widget.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
W. eWatson  
View profile  
 More options Jul 5, 11:33 pm
Newsgroups: comp.lang.python
From: "W. eWatson" <notval...@sbcglobal.net>
Date: Sun, 05 Jul 2009 20:33:48 -0700
Local: Sun, Jul 5 2009 11:33 pm
Subject: Re: Adding the Copy Property to a Simple Histogram

Whoops, I missed it. I'm not quite sure what I did to make it seem like it
doesn't copy, but it does. I fooled myself. All is well.

--
                                W. eWatson

              (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
               Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

                     Web Page: <www.speckledwithstars.net/>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google