Skip to main content
Table of Contents

TTMSFNCTaskDialog.InputControl Property

Gets or sets a custom input control hosted by the dialog.

API unit family: TMSFNCTaskDialog Declaring type: TTMSFNCTaskDialog Inherited from: TTMSFNCCustomTaskDialog Type: TControl

Syntax

FMX.TMSFNCTaskDialog.hppPascalC++
property InputControl: TControl;
__property Fmx::Controls::TControl* InputControl = {read=FInputControl, write=SetInputControl};

Usage examples

Host a custom input control in the task dialog

Assigns an existing color selector as custom input and initializes it when the dialog is created.

Host a custom input control in the task dialogPascalC++
procedure TForm1.ShowColorTaskDialog;
begin
  TMSFNCTaskDialog1.Title := 'Pick a highlight color';
  TMSFNCTaskDialog1.Instruction := 'Choose the color used for highlighted rows.';
  TMSFNCTaskDialog1.Icon := tdiInformation;
  TMSFNCTaskDialog1.InputType := titCustom;
  TMSFNCTaskDialog1.InputControl := TMSFNCColorWheel1;
  TMSFNCTaskDialog1.Execute;
end;

procedure TForm1.TMSFNCTaskDialog1DialogCreated(Sender: TObject);
begin
  TTMSFNCColorWheel(TMSFNCTaskDialog1.InputControl).SelectedColor := gcDarkcyan;
end;
void __fastcall TForm1::ShowColorTaskDialog()
{
  TMSFNCTaskDialog1->Title = "Pick a highlight color";
  TMSFNCTaskDialog1->Instruction = "Choose the color used for highlighted rows.";
  TMSFNCTaskDialog1->Icon = tdiInformation;
  TMSFNCTaskDialog1->InputType = titCustom;
  TMSFNCTaskDialog1->InputControl = TMSFNCColorWheel1;
  TMSFNCTaskDialog1->Execute();
}

void __fastcall TForm1::TMSFNCTaskDialog1DialogCreated(TObject *Sender)
{
  static_cast<TTMSFNCColorWheel *>(TMSFNCTaskDialog1->InputControl)->SelectedColor = gcDarkcyan;
}

Read the related guide