TCheckCombobox issues on Windows
- Lazarus/FPC Version: Lazarus 2.3.0 rmain-2_3-196-g3a251be1 FPC 3.2.2 x86_64-win64-win32/win64
- Operating System: Windows 10
- CPU / Bitness: 64 Bit
What happens
As reported by Bart in #39412 (comment 693234814) there are some issues with TCheckCombobox:
- In the closed-up state, when Text shows a checked item, clicking in the Text shows the dropdown, but you cannot set Checked anymore for that Item
- If you click on the Text, the dropdown opens, but clicking on the arrow does not close the dropdown
- If you click the arrow, then use the arrow-keys to traverse the list, at random some item gets checked.
This happens on Windows only.
These issues are caused by the usage of LCL widgetset defines ({if defined(LCLWin32)...}) inside the LCL unit comboex. Such defines are available only outside the LCL and, thus, are ignored here leading to execution of the non-Windows part. When, for a test, these code parts are rewritten so that the {
if...} branch is available on Windows the reported bugs disappear.