Why does a Delphi ComboBox (in firemonkey) not work properly when its parent is a panel?


I am wondering if this is a bug, or there is something simple I am missing and it is as designed. When I drop a combobox on a form, it works fine when it has several items populating it. However, as soon as I drop the combobox into a panel (as its parent) it no longer works properly.

When I click it to drop down the items, it does not function correct, AFAICT: it shows the items, but it does not select/highlight an item when you hover over it, and the scroll bars don’t respond. I can get it to work by fiddling around with the size of it (adding a splitter and resizing the panel) but it is hit and miss.

Steps to reproduce:

drop a panel on a firemonkey form
drop a combobox (with items) into the panel
run the project
it does not behave correctly, AFAICT when you drop down, and hover over items with the mouse (nothing happens), and scrollbars are unresponsive

It does respond to a click, but does not hover highlight the item you are over, and scroll bars don’t respond to click.

This is on MS Windows, Delphi Tokyo. Have not tried on MacOS.

EDIT: actually, now it does not seem to work correct on a regular form (no panel) too. Seems to be intermittent, or I don’t understand the issue fully.

Comments are closed.