I use Delphi7 and I would like to have a ComboBox with separator elements (as in popup menus).
I saw this perfectly implemented in Mozilla Sunbird (I know this is not Delphi ...) as follows:
The separator element is the simple gray line in the center of the element.
If you hover over the separator, selections do not appear
If the user presses the delimiter, he is not selected. And the combobox does not close.
No. 1 can be implemented using DrawItem. I could live without No. 2 because I have no idea about it.
For number 3, I ask you for help. I realized that immediately after closing the message CBN_CLOSEUP is sent to the combo box.
I was thinking about connecting the proc window, and if CBN_CLOSEUP is sent to a specific combobox, then against it. But I'm not sure if this is the best solution, or maybe there are other, more elegant ways?
Whatever the solution, I would like to have a standard ComboBox that correctly supports WinXP / Vista / 7.
Thank!
Edit: For a working component, see this thread:
Can you help translate this very small C ++ component into Delphi?
Steve source
share