Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Be sure to checkout the web demo, quite impressive IMO:

https://emilk.github.io/egui/index.html



Why does every IM UI library have a dropdown widget that they call "Combo box"? Dear IMGUI, Nuklear, this one does it too.

A dropdown list is not a combo box - a combo box is a text input box combined with a dropdown list. This "combo" aspect is missing in all these frameworks, but they still call their simple dropdowns "Combo box".


Because in the 'olden days' (Win 3.0 era) there was only a combobox, not a separate dropdown. Over the years the names have stuck.


FWIW, Windows screen readers also refer to plain drop-downs as combo boxes. I didn't think anything of it until I read this thread.


I think what happened is that a combobox and dropdown-list merged, because basically the combobox is an editable dropdown list. Qt's QComboBox definitely combines them. Apple does not (NSComboBox is editable, NSPopupButton appears to not be). Not sure what Windows or GTK do.


In some widely influential toolkits, like Win32[0], this is just a part of the style state and even comboboxes without text fields are called comboboxes.

So the name stuck. It isn't really much different than calling them "radio buttons" even though they have nothing to do with radios.

[0] https://docs.microsoft.com/en-us/windows/win32/controls/abou...


> It isn't really much different than calling them "radio buttons" even though they have nothing to do with radios.

The button set on the face of many dashboard radios would physically pop out the previously pressed button when you pushed a different one in so only one in the set would be selected. The name is pretty obvious if you've used the physical version but I haven't seen one since the 90s.


Yes, i know this backstory which is why i mentioned radio buttons: they called like that because of some historical reference, not because they have anything to do with radios.

Similarly comboboxes are called like that because of historical reference (to the combobox control on Win32 that provided the functionality) even though they aren't really a combination of input box and list.

(though one could claim that they are still a combination of a button and a drop-down list, so the name still has some relevance to what is displayed, unlike radio buttons)


> … not because they have anything to do with radios.

They work like radio buttons. How’s that having ‘nothing’ to do with radios?


I use JUCE a lot and they have use the ComboBox name as well. Always reminds me of creating custom levels in THPS...


the juce combobox uses a texteditor widget, so it actually deserves that name.




> Why does every IM UI library have a dropdown widget that they call "Combo box"?

They can call it whatever they want?

> A dropdown list is not a combo box

Who says?


Parent has been down voted to oblivion but they make a good point - arguments over words and names seldom produce any interesting discussion or definitive conclusions.


https://docs.microsoft.com/en-us/windows/win32/controls/comb...

The Win32 API is going to continue to drive naming conventions when all of us are dead.

But yeah, the difference between a combobox, a listbox, and a dropdownlist is just a flag value.


There's actually a separate ListBox control. And I never thought of it at the time, but why does an option turn a ComboBox into a DropDownComboBox, but an option doesn't turn a ListBox into a DropDownListBox? Oh no, it's all coming back to me, because ComboBoxes were added later and rather than change ListBox they added DropDownList functionality to ComboBox.

I also don't see an option in ListBox to make it multi-select, was it all horribly done in the notification handling code?


The font rendering is almost unreadable on my machine, but the functionality seems to be there


On windows 10 here, the font rendering was also what put me off immediately in the demo.


It seems like the font rendering doesn't do any antialiasing (other things are antialised, you can toggle it in backend/settings). The result is pretty painful to look at small sizes, unless you compensate with screen resolution (as apple now does).

Zooming the page to 130% gives me a quite acceptable experience.


Same - Fedora 34, nvidia driver. Excellent performance though.


> NOTE: The WebGL backend does NOT pass the color test.

> This is because WebGL does not support linear framebuffer blending (not even WebGL 2!).

> Maybe when WebGL3 becomes mainstream in 2030 the web can finally get colors right?

Yes, I had to transcribe this manually because I couldn't copy and paste it.


This is quite standard desktop gui behaviour.


Definitely, but I think part of the underlying criticism here is that standard desktop GUI behavior on text selection and copy-paste is bad, and we're kind of questioning whether it's good to encourage the web to continue moving in that direction.


This is way snappier on iOS than I would have expected. Feels faster than most web apps.


That official egui demo is phenomenal.


I can't seem to select any text on my phone.


Text in labels and other controls is not selectable (unfortunately), in this regard egui behaves as a native app, so mostly just editable texts are selectable. This feels a bit unnatural on the web, but one must consider that egui uses a custom WebGL renderes, so the content is not backed by standard DOM.


On native apps with Qt text on any widget can be made selectable via a property.


The text in the textbox is selectable, so it's not like egui can't handle text selection. It's just following convention with making GUI text unselectable.


Non-copyable texts by default in "native" applications sounds reasonable but is actually one of those things that introduces unnecessary friction down the line when users try to write tutorials or reports and have to manually type out everything.


Yeah, I would like to see that behavior as an option, or even better allow to select the whole UI as a block of text (to feel natural and be searchable on the web). I belive any UI (incl. native) should not prevent you from copying any text.


Yeah, it's not using the dom, it's using a canvas with webgl.


As a user of a keyboard driven browser, I hate it. I hope this trend of rendering the whole page on html canvas never catches on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: