title: How to code drop-down list properly in kivy-language?
body: <p>I'm testing the drop-down list in order to get rid of some buttons in another code of mine but i can't make it work. On kivy's main web page the explanation is really shallow principaly when talking about the kv lang.</p>
  <p>What i wanna do is <a href="https://kivy.org/doc/stable/_images/dropdown.gif" rel="nofollow noreferrer">this</a>, with fewer buttons. But i'd like to do it in kv lang. In my test code the drop-down list comes &quot;opened&quot; but it really doesn't show anything. You have to click on the slice of text that should be a button for it to close and than it won't open anymore.</p>
  <p>How do i code this properly?</p>
  <p>Heres my kv code:</p>
  <pre><code>&lt;CustomDropDown&gt;:
  
      Button:
          id: btn
          text: 'hello'
          on_release: dropdown.open(self)
  
      DropDown:
          id: dropdown
          size_hint_y: None
          on_select: btn.text = &quot;{}&quot;.format(args)
          Button:
              text: 'btn 1'
              on_release: dropdown.select(self.text)
  
          Button:
              text: 'btn 2'
              on_release: dropdown.select(self.text)
  
          Button:
              text: 'btn 3'
              on_release: dropdown.select(self.text)
  </code></pre>
  <p>And here is my Python code:</p>
  <pre><code>from kivy.app import App
  from kivy.uix.widget import Widget
  
  
  class CustomDropDown(Widget):
      pass
  
  
  class TestesApp(App):
      def build(self):
          return CustomDropDown()
  
  
  if __name__ == &quot;__main__&quot;:
      TestesApp().run()
  
  </code></pre>