Open flxzt opened 1 year ago
I wrote a simple component that aims to do this exact thing; what baffles me the most is that I have to call request_focus()
on each frame, otherwise my editor is not accepting any input.
the result of me calling request_focus()
is that the CPU utilization spikes to (at best) 40%, which is unfortunately unacceptable: embedding a TextEdit
within the ComboBox
dropdown to allow filtering items works, but appears to be a bad idea (I filter my items only when filter value changes; even 3 items on the list keep my CPU at 40% utilization).
I'll see if I can build a performant variant of this; if I succeed, I'll make a pull request.
@tomasz-wiszkowski How's it going?
Mixed results TBH, but after some time working with egui I begin to think this may be linked to design decisions.
Getting editable combo box to work is not a big problem. Getting it to work well - is.
showing this can consume even 10% of the CPU. Even more if you move mouse.
Is your feature request related to a problem? Please describe.
Currently the widget named combobox is implemented as what other UI toolkits would describe as a dropdown or dropmenu. Usually a combobox is a combination of a text edit and a dropdown with a lsit of entries that replace the content when selected. see wikipedia.
Describe the solution you'd like I think renaming the existing combobox widget to dropdown and creating a new one with an editable text field would match user expectations better and would add a new very useful and classic widget to the toolkit.
Describe alternatives you've considered
I tried using a simple text field next to the current combobox widget, but since you cannot only display the arrow button it is awkward because it always expands to the width of the selectable entries. See: