title: Kivy Popup dynamically change height
body: <p>I have the following Kivy Option Popup</p>
  
  <pre><code>s ='''
  &lt;OptionPopup&gt;:
      id: optionPopup
      size_hint : (None,None)
      width : min(0.95 * self.window.width, dp(500))
      title: "Option Title"
      height: content.height
      BoxLayout:
          id: content
          orientation: 'vertical'
          spacing: '5dp'
          height: contentButtons.height + cancelButton.height
          BoxLayout:
              id: contentButtons
              orientation: 'vertical'
              spacing: '0dp'
              height : self.minimum_height
  
          SettingSpacer:
          Button:
              id:cancelButton
              size_hint_y : None
              height: '50dp'
              text: "Back"
              on_release: optionPopup._dismiss()
  
  
  '''
  Builder.load_string(s)
  </code></pre>
  
  <p>This Popup exists only once in my application and I will dynamically add Buttons to the <code>optionPopup.ids["contentButtons"]</code>. Meaning the <code>contentButton</code> layout <code>minimum_height</code> gets changed. How can I properly adjust the size of my parent Boxlayouts <code>content</code> and the PopUp windows?
  The above <code>kv</code> options seem to do the right thing like binding <code>optionPopup.height</code> to <code>content.height</code>, but it does not work?</p>
  
  <p><a href="https://i.stack.imgur.com/QpSn0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QpSn0.png" alt="The popup"></a></p>