ListBox not native looking

How come the ListBox looks like this on macOS:

This is not the native look right?

It looks better in your docs:

Thanks

Since we added an image of the ListBox control to the documentation, the control has evolved significantly. It is now implemented entirely within the library, without relying on native components. This redesign allows for customizable item rendering, supports a large number of items efficiently, and ensures consistent functionality across all operating systems.

Native implementations provided by wxWidgets had bugs that prompted a complete reimplementation of the ListBox.

It’s possible to configure the selection rectangle with rounded corners and apply color schemes similar to macOS-style selection highlights. Would you like an example of how to set up a ListBox with a selection rectangle featuring rounded corners?

I understand.

A tad dissapointing to be honest, given how the framework is advertised. From my perspective the central value proposition with AlternNET UI is native controls on Windows, macOs and Linux, with a neat winform style facade that exposes the common denominators between the platforms. Magical.

I understand that custom controls are tempting as the native control functionalities are not identical across the different platforms. But that was kind of the whole unique thing with AlterNET UI, at least as I saw it. A look-a-like will never be the real thing.

With non-native controls AlternNET UI loses a big chunk of its appeal to me personally.. although I still appreciate how much snappier the AlterNET UI is compared to MAUI and Avalonia and the likes..

What kind of bugs did the wxWidgets have? How unfixable are they?

Cheers

The main issues with the native ListBox were the following:

  • It displays only plain text, without support for images or customizations such as alignment, formatted or word-wrapped text, bold portions, or custom foreground and background colors. Using two different ListBox controls—one native and one fully featured—is problematic, as it’s impossible to make them look and behave identically.
  • It performs poorly with a large number of items. Even with just 1,000 entries, noticeable slowdowns occur. The maximum number of items supported by the native control is 65,000.
  • There were various runtime exceptions in native ListBox and CheckListBox under Linux and macOS, likely due to insufficient testing of wxWidgets on these platforms.
  • It did not allow customization of the border color and some other visual settings.

Although there are many more shortcomings, these were critical enough to warrant a complete replacement. Our current ListBox implementation supports customization and can mimic the native appearance when needed.

We plan to reintroduce the native list box in one of the upcoming builds. The following three list box types will be available:

  • ListBox – uses the native control.
  • VirtualListBox – a virtualized list box with advanced features, utilizing ListControlItem as its item type.
  • StdListBox – inherits from VirtualListBox but provides the same API as ListBox.

In build 0.9.759, we restored the native ListBox and CheckedListBox implementations. We also provide StdListBox and StdCheckListBox, which are implemented inside the library.