The leftedge variable is a column number, not an x position.
Attach a file by drag & drop or click to upload