Copying selected text from one text area to another. : ScrolledText : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » ScrolledText »

 

Copying selected text from one text area to another.


Copying selected text from one text area to another.
from Tkinter import *
import Pmw

class CopyTextWindowFrame ):
   def __init__self ):
      Frame.__init__self )
      Pmw.initialise()
      self.packexpand = YES, fill = BOTH )
      self.master.title"Select then click move" )

      self.text1 = Pmw.ScrolledTextself, text_width = 25, text_height = 12, text_wrap = WORD,
         hscrollmode = "static", vscrollmode = "static" )
      self.text1.packside = LEFT, expand = YES, fill = BOTH, padx = 5, pady = )

      self.copyButton = Buttonself, text = ">>", command = self.copyText )
      self.copyButton.packside = LEFT, padx = 5, pady = )

      self.text2 = Pmw.ScrolledTextself, text_state = DISABLED,
         text_width = 25, text_height = 12, text_wrap = WORD,
         hscrollmode = "static", vscrollmode = "static" )
      self.text2.packside = LEFT, expand = YES, fill = BOTH, padx = 5, pady = )

   def copyTextself ):
      self.text2.settextself.text1.getSEL_FIRST, SEL_LAST ) )

CopyTextWindow().mainloop()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tkinker
» ScrolledText