Disabled Text control : Text : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » Text »

 

Disabled Text control


Disabled Text control
from Tkinter import *
from tkMessageBox import *

class EntryDemoFrame ):
   def __init__self ):
      Frame.__init__self )
      self.packexpand = YES, fill = BOTH )
      self.master.title"Testing Entry Components" )
      self.master.geometry"325x100" )

      self.frame1 = Frameself )
      self.frame1.packpady = )
      
      self.text3 = Entryself.frame1, name = "text3" )
      self.text3.insertINSERT, "Uneditable text field" )
      self.text3.configstate = DISABLED )
      self.text3.bind"<Return>", self.showContents )
      self.text3.packside = LEFT, padx = )

   def showContentsself, event ):
      theName = event.widget.winfo_name()

      theContents = event.widget.get()
      showinfo"Message", theName + ": " + theContents )

EntryDemo().mainloop()



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Tkinker
» Text