CellToTime(X, Y: Integer)

Good mornin Bruno,

excuse for this (elementary) question about use of CellTotime (TPlanner).

I use this function outside planner event (i.e. button) and i have some problem to find X coordinate.

While Y is current position, how can i get X in plDay ? (time on the left and only one position)

Thank's and have a good day


I'm not sure I understand the question. You mention that the time is on the left (so vertical time axis) and there is only one position, i.e. one column. In that case, X would be always 0.
If you are after the X,Y coordinates of the selected cell(s) in the Planner, you get this with:

Planner.SelPosition, Planner.SelItemBegin, Planner.SelItemEnd. In the case of a vertical time axis, Planner.SelPosition is the X coordinate and Planner.SelItemBegin, Planner.SelItemEnd the Y start & end coordinate of the selected cells.

Thank's for reply Bruno,

it was Planner.SelItemBegin (i considered it only for the planner items .... not for "cursor" position).