Page 1 of 1

Is it possible to open a combobox at runtime?

PostPosted: Fri Feb 08, 2013 8:30 pm
by m.moest
Is it possible to open a combobox at runtime? so, without clicking on it yourself.
Something like:

elements.MyCombobox.open();


My goal is to open a combobox when a button is clicked.

Re: Is it possible to open a combobox at runtime?

PostPosted: Sat Feb 09, 2013 1:41 pm
by Hans Nieuwenhuis
You could try elements.MyCombobox.requestFocus([false/true)

Regards,

Re: Is it possible to open a combobox at runtime?

PostPosted: Mon Feb 11, 2013 4:29 pm
by m.moest
Thanks for the reply!

Your solution works fine in the smartclient, but if i run it in the webclient it only selects the combobox and it doesn't open the combobox. So, is it not webclient compatible? And if it's not webclient compatible, is there another solution?

Re: Is it possible to open a combobox at runtime?

PostPosted: Tue Feb 12, 2013 7:37 am
by maria.kyselova
Hans Nieuwenhuis wrote:You could try elements.MyCombobox.requestFocus([false/true)

Regards,


That solution is actually annoying us :)
When I tab between my form elements I don't want my combos to open at all.
Will log an issue to fix it, so beware :wink:

Re: Is it possible to open a combobox at runtime?

PostPosted: Tue Feb 12, 2013 9:32 am
by jdbruijn
maria.kyselova wrote:When I tab between my form elements I don't want my combos to open at all.
Will log an issue to fix it, so beware :wink:

Try this:
Code: Select all
application.putClientProperty(APP_UI_PROPERTY.COMBOBOX_SHOW_POPUP_ON_FOCUS_GAIN, false);

Re: Is it possible to open a combobox at runtime?

PostPosted: Mon Feb 18, 2013 3:42 am
by maria.kyselova
jdbruijn wrote:
maria.kyselova wrote:When I tab between my form elements I don't want my combos to open at all.
Will log an issue to fix it, so beware :wink:

Try this:
Code: Select all
application.putClientProperty(APP_UI_PROPERTY.COMBOBOX_SHOW_POPUP_ON_FOCUS_GAIN, false);


Awesome!

Thanks, Jos.

Re: Is it possible to open a combobox at runtime?

PostPosted: Mon Feb 18, 2013 10:55 am
by jasantana
Just to add some more to Jos post.

You can set that property to certain elements:

Code: Select all
forms.someForm.elements.comboboxElement.putClientProperty(APP_UI_PROPERTY.COMBOBOX_SHOW_POPUP_ON_FOCUS_GAIN, true);