I'm using TTMSFNCColorPicker with Mode set to csmExtendedMore in a FireMonkey application. When the picker is dropped down and I click the already selected color item it changes color to transparent. Clicking it again changes it back to the original color. Why is that? How can I prevent this behavior?
I'm on Delphi 12.2.
After you set the mode, use the following code to block deselection of a color.
procedure TForm1.FormCreate(Sender: TObject);
var
I: Integer;
begin
TMSFNCColorPicker1.Mode := csmExtendedMore;
for I := 0 to TMSFNCColorPicker1.Items.Count - 1 do
TMSFNCColorPicker1.Items[I].CanDeselect := False;
end;
Thank you, worked great.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.