TMSFNCTaskDialog: Change Button background colour and icon?

Hello,

Is it possible to change background or/and the icon of the buttons of the TMSFNCTaskDialog?
For example the Ok and Cancel buttons.

Thank you!

Hi,

We don't have out of the box setters for these as the buttons you see are simple TButton controls, so you need to style them the way they'd be styled normally. In FMX that means using styles.

You can assign a TStyleBook to the underlying dialog form by setting it in the OnDialogCreated event:

procedure TForm1.TMSFNCTaskDialog1DialogCreated(Sender: TObject);
begin
  TMSFNCTaskDialog1.DialogForm.StyleBook := StyleBook1;
end;

We'll need to investigate if there is a way to provide access to the list of TButton controls so individual styles can be assigned.

Hi Tünde,

Thank you very much for your reply.
The reason I wrote this that one of my customers wants the OK button to be green and the Cancel button to be red so as his colleagues won't click on the wrong button unintentionally (to be easily distinguished).

Hi Zsolt,

We'll need to investigate what are the possibilities as without access to the button list I doubt you can individually configure the style of the buttons. I've put this on our todo list.

Hi Tünde,

Thank you very much!