Issue with TComboBox, Style=csDropDownList on Cocoa
Original Reporter info from Mantis: rphoover
-
Reporter name: Rick Hoover
Original Reporter info from Mantis: rphoover
- Reporter name: Rick Hoover
Description:
When using a TComboBox on Windows or OS-X with Qt, the Text property will return the text of the currently selected item in the drop-down list when the Style is set to csDropDownList. However, Cocoa will not return the selected value in the Text property. The Windows and Qt behavior match Delphi compatibility.
Steps to reproduce:
- Use the attached program and set the Widget set to Cocoa.
- Run the program and click on the "Read Combobox" button.
- On my system, the value "1" is returned. Instead it should be "First".
Changing the selected item for the combo box also updates the TEdit
widget through the OnChange and OnSelect handlers, but not correctly for Cocoa.
Additional information:
Apparently Cocoa expects one to use the ItemIndex property to fetch the currently selected entry, but this is different behavior from other widget sets.
This defect is also present in older versions of Lazarus / Cocoa.
Mantis conversion info:
- Mantis ID: 32964
- OS: OS-X
- OS Build: 10.11.6
- Build: Lazarus 1.8.0
- Platform: Apple
- Version: 2.3 (SVN)
- Monitored by: » Alextp (CudaText man)