Is there no ordinary dropdownmenu / combobox in Titanium???

You must Login before you can answer or comment on any questions.

Hi all.

Im looking for a way to create a standard dropdown menu, for my app. And it seems like Titanium does not have such a thing.

Im talking the classic dropdownmenu, where you see 1 textfield (usually empty at first), and a small arrow at the right side. And when you click it, a list of options is made visible. You click one of the items in the list, and the list dissappears and your textfield holds that value.

I have looked into the Pickers of Titanium, and it seems like this is the replacement for this classic UI-element.

Is is really nessesary to use a picker for this? I mean, it seems like a lot of work: 1. Creating a container view for the picker

  1. Add the picker to the containing view "picker-view"

  2. Create a event on the textfield, to show the picker-view (and deal with all the hassle of controlling the z-index, since the picker-view will be on top of some other views in my app)

  3. Create a event to handle the transfer of the value from the picker to the textfield, and then hiding the picker-view once again.

phew... what a load of work... Or am I missing something here???

3 Answers

Accepted Answer

I think you are looking for Titanium.UI.OptionDialog

Take a look at Jason's TitanUp library specifically his TU.UI.Views.SimplePicker

— answered 9 months ago by Stephen Feather
answer permalink
3 Comments
  • And this 'classic UI-element', you have Apple docs describing this?

    — commented 9 months ago by Stephen Feather

  • No but it appears in all sorts of software. I do not know if it is common in mobile apps. It might not be.

    — commented 9 months ago by Martin Olsen

  • 'I do not know if it is common in mobile apps.'

    Don't put that on your business cards...

    — commented 9 months ago by Stephen Feather

Titanium implements what is available on the native platforms. So you're not looking for such a thing in Titanium, you are looking for the equivalent in native controls. The picker seems to be what you are looking for. In the time that it took you to list out all those steps, you could have created and implemented the picker. Its just Ti.UI.createPicker()

— answered 9 months ago by Anthony Decena
answer permalink
10 Comments
  • I think 'option dialog' be a better solution for what he wants to implement

    — commented 9 months ago by Paul Hamilton

  • I gathered as much when you offered it to him as an answer. However, if he has a lot of options to choose from, then the option dialog would quickly become an issue. A picker is always the same size and holds as many options as you need.

    — commented 9 months ago by Anthony Decena

  • With all due respect, i really dont think i could have implemented the picker in my application in the same time... ;)

    — commented 9 months ago by Martin Olsen

  • Show 7 more comments

Your Answer

Think you can help? Login to answer this question!