1
votes

I have a TComboBox with several Strings in its Items list. When run on Windows, this works properly - I am able to click the combo-box, have the items appear, and then select one of the items.

When I set the OS target to OS X, however, the TComboBox does not allow me to select an item. I can click the TComboBox and have the items appear, but when I try to click an item from the drop-down list I receive a 'bump' sound on the Mac, and nothing is selected.

How can I get TComboBoxes to work properly on the Mac using Firemonkey?

I am using C++ Builder XE6 with FMX (Firemonkey).

1
Update: it seems to work fine for Mac on the project's main form, but not on other forms. - Anthony Burg
Update 2: it seems to work fine for Mac if a child form is shown normally, but when ShowModal () is called to display a child form it doesn't work. - Anthony Burg
Update 3: this issue has already been submitted to Embarcadero's Quality Central, as report #124874. - Anthony Burg
Hmmm what about replacement with TPopupBox? Functionality seems to be the same. - LHristov
Ya, TPopupBox is an option. I'm working with forms with lots of functionality, though, and I'd just as soon keep them separate for design purposes. - Anthony Burg

1 Answers

0
votes

Workaround:

Basic idea: use Show () instead of ShowModal (), combined with a component that will make the main form non-clickable while the child form is shown.

On the main form, add a TRectangle (or TPanel) with Visibility = false, Opacity = 0.25 (or something like that - could also be 0), and HitTest = true.

Then, when about to show a child form, call a function that sets the TRectangle on the main form to cover the main form (setting its Position->X, Position->Y, Width, Height) and then sets its Visibility = true.

Then, call a child form with Show () instead of ShowModal ().

When the child form is done, call a function on the main form that sets the TRectangle back to Visibility = false.