Scale used to control the size of a circle. : Scale : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » Scale »

 

Scale used to control the size of a circle.


Scale used to control the size of a circle.
from Tkinter import *

class ScaleDemoFrame ):
   def __init__self ):
      Frame.__init__self )
      self.packexpand = YES, fill = BOTH )
      self.master.title"Scale Demo" )
      self.master.geometry"220x270" )

      self.control = Scaleself, from_ = 0, to = 200,orient = HORIZONTAL, command = self.updateCircle )
      self.control.packside = BOTTOM, fill = X )
      self.control.set10 )

      self.display = Canvasself, bg = "white" )
      self.display.packexpand = YES, fill = BOTH )

   def updateCircleself, scaleValue ):
      end intscaleValue 10
      self.display.delete"circle" )
      self.display.create_oval1010, end, end,fill = "red", tags = "circle" )

ScaleDemo().mainloop()



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Tkinker
» Scale