Regarding clicking TimeLine in TTMSFNCPlanner

thank you always.

In TTMSFNCPlanner, when clicking on TimeLine, is it possible to obtain the time or cell position like OnSelectCell or OnSelectTime?

This is unfortunately not possible. We'll investigate if we can add events or functionality to retrieve that.

thank you

But is there any hope that it will be added somehow?
I would like to have a function that calls up the settings for the relevant time zone by clicking on the TimeLine...

I wish there was an alternative...

You can try the code snippet below

type
  TTMSFNCPlannerOpen = class(TTMSFNCPlanner);

procedure TForm48.TMSFNCPlanner1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Single);
var
  p: TTMSFNCPlannerOpen;
  cl: TTMSFNCPlannerCell;
  dt: TDateTime;
  r: TRectF;
begin
  p := TTMSFNCPlannerOpen(TMSFNCPlanner1);

  r := p.GetTimeLineLeftRect;
  if PtInRect(r, PointF(X, Y)) then
  begin
    cl := TMSFNCPlanner1.XYToCell(X + r.Width + 20, Y);
    dt := TMSFNCPlanner1.CellToDateTime(cl);
    TTMSFNCUtils.Log(DateTimeToStr(dt));
  end;
end;

It seems that the purpose can be achieved.

This may be implemented using standard events.

By the way, is there a reason why it's +20?
It seems that you can get it without adding it...

Also, since OrientationMode may be pomHorizontal,

     case TMSFNCPlanner1.OrientationMode of
       pomVertical:
         cl := TMSFNCPlanner1.XYToCell(X + r.Width + 20, Y);
       pomHorizontal:
         cl := TMSFNCPlanner1.XYToCell(X, Y + r.Height + 20);
     end;

It seems that you can get it with this code.

Thank you !

Because the XYToCell is basically targeting the grid which lies within the boundaries of the timeline & the resources. So it wouldn't return the correct date-time, therefore we "simulate" a detection as if you would select a cell next to the timeline.