Creating custom TTMSFNCResponsiveList controls

Hi,

I am trying to do this in an FMX project but your documentation only shows how to do this in a VCL project.

Can you please provide an example of how to do this?

Thanks,

Ken

You can use FNC controls in VCL projects and in FMX projects.

What is shown for VCL projects can be done in exactly the same way in FMX projects.

I am referring to the text in TMSFNCResponsiveListDevGuide.pdf.

procedure TResponsiveListItemEx.DrawItem(ACanvas: TCanvas; ATemplate: string; ARect: TRect); begin inherited DrawItem(ACanvas, ATemplate, ARect);
if Assigned(FPicture.Graphic) and not FPicture.Graphic.Empty then ACanvas.Draw(ARect.Left + 10, ARect.Top + 10, FPicture.Graphic);
ACanvas.TextOut(ARect.Left, ARect.Top, CustomProp);
end;

What exact problem do you encounter with that?

Unless I'm getting confused, which is always possible, the FMX.TMSFNCResponsiveListItem DrawItem procedure is:

procedure
DrawItem(AGraphics: TTMSFNCGraphics; AItem: TResponsiveListItem;
ATemplate, AHeaderTemplate, AFooterTemplate: string; ARect: TRect;
Focus: boolean);

Wheras is the example in the help file is:

procedure TResponsiveListItemEx.DrawItem(ACanvas: TCanvas; ATemplate: string; ARect: TRect);

We added in v1.2 a footer & header template capability and therefore needed to extend the DrawItem() method. We'll need to update the developer guide to reflect this.

Thank you. It would also be very much appreciated if a sample app could be included as this is an extremely powerful option.

We'll consider it.