Skip to content

[HINT] Can you create a TALComboBox ? #505

@maurobotta

Description

@maurobotta

Hi @Zeus64

There is no decent alternative to the original Delphi FMX TComboBox component.

In my iOS/Android mobile app, I’m facing graphical inconsistencies: the default TComboBox components don’t integrate well with dark themes, especially on iOS, and they cause visual issues.

Below is an example of widely used source code (cbDestinazione: TComboBox). It would be important to maintain good compatibility with existing Pascal code.

( @ETSPMeder Any hint ? )

Best Regards
Mauro Botta

function Example_Load_TCombobox(tblOrigine: TFDMemTable; cbDestinazione: TComboBox): string;
var
myListItem: TListBoxItem;
begin
Result := '';

cbDestinazione.Items.BeginUpdate;

cbDestinazione.Items.Clear;

myListItem := TListBoxItem.Create(cbDestinazione);
..
if cbDestinazione.DropDownKind <> TDropDownKind.Custom then
cbDestinazione.DropDownKind := TDropDownKind.Custom;
..
if cbDestinazione.HelpContext <> 0 then
Tag := cbDestinazione.HelpContext;
..
myListItem.Text := tblOrigine.FieldByName(sCampoDesc).AsString;
cbDestinazione.AddObject(myListItem);

..

cbDestinazione.Items.EndUpdate;

end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions