TMSFMXCalendar

Hi there,


I am trying to make a component inherited from TTMSFMXCalendar, It is needed in order to adapt the component behavior to my MVP framework.

However it does not show anything. I have made from others TMS components correctly.

I suppose it is related to the Style, I have tried this one, but did not work.

function TNaharFMXCalendar.GetDefaultStyleLookupName: string;
begin
  Result := ClassParent.ClassName + 'style';
  Delete(Result, 1, 1);
end;

and this one:

function TNaharFMXCalendar.GetDefaultStyleLookupName: string;
begin
  result := 'CalendarStyle';
end;

worked better, but it was not a complete calendar, the numbers did not show up.

I am inheriting from TTMSFMXCalendar.

What is necessary to make it show correctly?

Thanks!
The correct result should be case-sensitive

function TNaharFMXCalendar.GetDefaultStyleLookupName: string;
begin
  Result := 'ttmsfmxcalendarstyle';
end;

Kind Regards,
Pieter

Pieter,


It did not work. I even tried removing the first 't'.

It shows nothing, just the wire frame of the component selection.

thanks
Hi, 

Our base implementation uses GetClassStyleName instead of GetDefaultStyleLookupName, I overlooked this in your code.

type
  TTMSFMXCalendarEx = class(TTMSFMXCalendar)
  protected
    function GetClassStyleName: String; override;
  end;

implementation

{ TTMSFMXCalendarEx }

function TTMSFMXCalendarEx.GetClassStyleName: String;
begin
  Result := ClassParent.ClassName + 'style';
  Delete(Result, 1, 1);
end;

Kind Regards, 
Pieter

Thank you, that solved the problem!