picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

Open a ComboBox from code #1260

Open TomQv opened 5 years ago

TomQv commented 5 years ago

How would I open a ComboBox by code on OSX?

On WPF I can do:

 var wpfcombobox = myetoformscombobox.ControlObject as Eto.Wpf.Forms.Controls.EtoComboBox;
 wpfcombobox.IsDropDownOpen = true;

But I can't figure out, how to do the same with the Eto.Mac.Forms.ComboBox.

Use case is, we need a search-as-you-type algorithm. So as we type a task is searching and as soon as results coming in, the ComboBox must open automatically and display the first three hits. With WPF this is working, but on Mac the user must manually open the combobox with mouse or arrow-down-key.

cwensley commented 5 years ago

Try calling NSPopUpButton.PerformClick();

cwensley commented 5 years ago

Issue is now tracking the request to add extra API to open the combobox/dropdown menu via code in Eto.

LaraSQP commented 4 years ago

Would like this too.

ris-work commented 2 weeks ago

I would like this as well... It will be very useful, especially something like suggestions for autocomplete.