title: How to change on_press "animation" of Tkinter button in python
body: <p>i have a taskbar-like <code>Frame</code>, which contains custom <code>Button</code>s with images. But everytime i click on this button, Tkinter displaced the button 1px to the right/buttom.</p>
  
  <p><img src="https://i.stack.imgur.com/2o9tr.png" alt="Button clicked"></p>
  
  <p>Is it possible to override this behaviour? Or do i have to derived from <code>Tkinter.Label</code> instead of <code>Tkinter.Button</code> ?</p>
  
  <p><strong>edit:</strong>
  Adding some code:
      import Tkinter
      import logging</p>
  
  <pre><code>logger = logging.getLogger(__name__)
  class DesktopBtn(Tkinter.Button):
      '''
      Represents a Button which can switch to other Desktops
      '''
  
      _FONTCOLOR="#FFFFFF"
  
      def getRelativePath(self,folder,name):
          import os
          dir_path = os.path.dirname(os.path.abspath(__file__))
          return os.path.abspath(os.path.join(dir_path, '..', folder, name))
  
      def __init__(self, parent,desktopManager,buttonName, **options):
          '''
          :param buttonName: Name of the button
  
          '''
          Tkinter.Button.__init__(self, parent, **options)
          logger.info("init desktop button")
          self._imagePath=self.getRelativePath('res','button.gif')
          self._BtnPresspath = self.getRelativePath('res','buttonP.gif')
          self._BtnPressImage = Tkinter.PhotoImage(file=self._BtnPresspath)
          self._image = Tkinter.PhotoImage(file=self._imagePath)
          self.bind('&lt;ButtonPress-1&gt;',self._on_pressed)
          self.bind('&lt;ButtonRelease-1&gt;',self._on_release)
          self._parent = parent
          self._btnName = buttonName
          self._desktopManager = desktopManager
          self.config(width=70, height=65,borderwidth=0,compound=Tkinter.CENTER,font=("Arial", 9,"bold"),foreground=self._FONTCOLOR, text=buttonName,wraplength=64,image=self._image, command=self._onClickSwitch)
  
      def _on_pressed(self,event):
          self.config(relief="flat")
          self.config(image=self._BtnPressImage)
  
      def _on_release(self,event):
          self.config(image=self._image)
  
      def _onClickSwitch(self):
          self.config(relief="flat")
          logger.info("Buttonclickmethod onClickSwitch")
          self._desktopManager.switchDesktop(self._btnName)
  
      def getButtonName(self):
          return self._btnName
  </code></pre>