ComboBox widget request #426

Closed
rubik opened this Issue Mar 18, 2012 · 8 comments

Comments

Projects
None yet
3 participants

rubik commented Mar 18, 2012

It would be useful to have a ComboBox widget, like this:
http://qt-project.org/doc/qt-4.8/qcombobox.html

Owner

tshirtman commented Mar 18, 2012

I did a little proof of concept in the combobox branch (https://github.com/kivy/kivy/tree/combobox), can you test and see if it's useful for you? Also, in a lot of situations using a Popup is a better alternative.

rubik commented Mar 19, 2012

Thank you for the quick reply. I tested it, and only a few things are missing. One should be able to set a default value, and the popup should stay opened after the first touch, not disappearing if the touch disappears.
Thank you for your help.

Owner

tshirtman commented Mar 19, 2012

To set the default value, just pass a value to the text propery as you would do for any widget.

For the ergonomics of it, can you describe what should trigger the closing of the options? I thought about it a little and the current solution seemed the most satisfying, would you prefer it to stay open until a second touch on an option is done? should it try to be smart and decide whether it's a one-touch or a two-touch one, based on time or on distance moved?

rubik commented Mar 19, 2012

Thank you again. Yes, I thought about it and now I'm pretty sure you are right: the current solution is the most satisfying and useful. The other solutions are simply too complicated... I would just add a couple of properties / events that might be useful:

  • event on_highlight: triggered when a label is hovered by the mouse / touch
  • property current_index to hold the current index

As for the default value, doing as you suggested I don't have that value among self.values. I'll open a pull request to add those two ideas.

Owner

tshirtman commented Mar 19, 2012

granted :) (branch updated)

Owner

tito commented Aug 7, 2012

Is the spinner is doing the work, then can you close the issue ? @rubix @tshirtman

Owner

tshirtman commented Aug 7, 2012

agreed!

@tshirtman tshirtman closed this Aug 7, 2012

rubik commented Aug 8, 2012

Yes, the Spinner is awesome! :) Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment