title: How to get Id and Text value of a kivy button as string?
body: <p>I have an app with multiple buttons and I need to get id and text value of the button as string when it is pressed. The grabbed Ids and Text valus of the button will then be passed to another function for further processing. For simplicity I wrote this sample programme.</p>
  
  <pre><code># main.py
  
  from kivy.app import App
  from kivy.uix.boxlayout import BoxLayout
  
  ########################################################################
  class KVMyHBoxLayout(BoxLayout):
      pass
  
  
  ########################################################################
  class ExampleApp(App):
      def Pressbtn(self, *args):
          print'Pressed button'
      #----------------------------------------------------------------------
      def build(self):
  
          return KVMyHBoxLayout()
  
  #----------------------------------------------------------------------
  if __name__ == "__main__":
      app = ExampleApp()
      app.run()
  </code></pre>
  
  <p>kv file</p>
  
  <pre><code>&lt;MyButton@Button&gt;:
      color: .8,.9,0,1
      font_size: 32
  
  &lt;KVMyHBoxLayout&gt;:
      orientation: 'vertical'
      MyButton:
          id:"idBtn1"
          text: "Btn1"
          background_color: 1,0,0,1
          on_press:app.Pressbtn()
      MyButton:
          id:"idBtn2"
          text: "Btn2"
          background_color: 0,1,0,1
          on_press:app.Pressbtn()
      Label:
          text: "ID"
          background_color: 0,0,1,1
      Label:
          text: "Text"
          background_color: 1,0,1,1
  </code></pre>
  
  <p>When a button is pressed its corresponding values of id and text will be shown in the ID and Text labels. Currently the above code only print <strong>Pressed button</strong> when button is pressed. I want to know how to get id and text value of button pythonically.</p>