Jump to content
Sign in to follow this  
Yaron

A TComboBox alternative not based on WinAPI

Recommended Posts

The standard Delphi TComboBox is based on WinAPI. Every item you add to the list triggers a WinAPI "SendMessage" call, which takes much (x100) longer than adding an item to a TStringList.

 

To overcome this delay, with the help of AI, I designed a slimmed down replica of TComboBox based on TStringList:

https://github.com/bLightZP/ZPComboBox

 

If you have a form with lots of TComboBox drop down list components and it's not opening fast enough for you, try this.

Limitations

  • The only event supported is OnChange.
  • The only style supported is csDropDownList.
  • The pop-up listbox is shown in a pop-up window, so the underlying window's title bar changes color when losing focus.
  • The styling is close to TComboBox, but not identical.
  • Like 2
  • Thanks 1

Share this post


Link to post

Sounds good!
Can you even make a version where you can locate an Item by typing, like csDropDown, but it must be an item from the list?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×