title: How to store the button id on which we clicked for another class in kivy
body: <p>I want to use the id of the button I clicked on screen1 to open some content related to it on screen2. Suppose i have created 5 buttons with different names on them. If i click button 1 it should open-content related to button 1 and vice versa.</p>
  <p>Here is the code for my main .py file:</p>
  <pre><code>from kivy.app import App
  from kivy.lang import Builder
  from kivy.uix.screenmanager import Screen,ScreenManager
  
  
  class MainWindow(Screen):
      def category(self):
          carsquiz=self.ids  #it should contain that button id which was clicked
          self.manager.current='quizgo'
  
  class QuizWindow(MainWindow,Screen):
      def something(self):
          # i want to access that button id in this screen
          pass
  
  class WindowManager(ScreenManager):
      pass
  
  class StandAlone(App):
      def build(self):
          return Builder.load_file('StandAloneQuiz.kv')
  
  if __name__==&quot;__main__&quot;:
      StandAlone().run()
  </code></pre>
  <p>Here is the code for my .kv file:</p>
  <pre><code>#:kivy 2.1.0
  WindowManager:
      MainWindow:
      QuizWindow:
  
  &lt;MainWindow&gt;:
      name:&quot;index&quot;
      BoxLayout:
          orientation:'vertical'
          Label:
              text:'Choose your category...'
              font_size:25
          Button:
              text:'category 1'
              id:category1
              on_press:
                  root.category()
                  root.manager.transition.direction='left'
  
          Button:
              text:'category 2'
              id:category2
              on_release:
                  root.category()
                  root.manager.transition.direction='left'
          Button:
              text:'category 3'
              id:category3
              on_release:
                  root.category()
                  root.manager.transition.direction='left'
          Button:
              text:'category 4'
              id:category4
              on_release:
                  root.category()
                  root.manager.transition.direction='left'
          Button:
              text:'category 5'
              id:category5
              on_release:
                  root.category()
                  root.manager.transition.direction='left'
  
  &lt;QuizWindow&gt;:
      name:&quot;quizgo&quot;
      Button:
          text:'go Back'
          on_release:
              root.something()
              app.root.current=&quot;index&quot;
              root.manager.transition.direction='right'
  </code></pre>