Hi,<br>Perhaps this is a noob misunderstanding - but the following is the simplest script I <br>could muster that shows the issue. <br><br>The intent is to instantiate an element on a mouse click, at the position of the mouse click.
<br>I am having trouble deciphering the difference between the global and local mouse events. <br><br>Within the window in the script below, x=0,y=0 seems to be indexed of the window area accounting for the border. <br>However, the canvas_click and local_click are essentially at the same point. 
<br><br>The issue with this is that the local_click and canvas_click are being instantiated offset by the title bar height and <br>border wrt the actual mouse click.<br><br>Would this be a bug or am I doing something wrong? 
<br>Any help is much appreciated. <br><br>I am using the 4.0.7 SDK to build this. <br><br>thanks,<br>-shishir<br><br><br>&lt;canvas debug=&quot;true&quot;&gt;<br>&nbsp; &lt;handler name=&quot;onclick&quot; reference=&quot;LzGlobalMouse&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; Debug.write(&#39;Global onclick x:&#39; + canvas.getMouse(&#39;x&#39;) + &#39; y:&#39; + canvas.getMouse(&#39;y&#39;));<br>&nbsp; &lt;/handler&gt;<br><br>&nbsp; &lt;class name=&quot;myshow&quot; extends=&quot;inputtext&quot;&gt;
<br>&nbsp; &lt;/class&gt;<br><br>&nbsp; &lt;window name=&quot;mywindow&quot; x=&quot;1&quot; width=&quot;25%&quot; height=&quot;25%&quot; clickable=&quot;true&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;handler name=&quot;onclick&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var local_zero = new myshow (mywindow, { x:&quot;0&quot;, y:&quot;0&quot;, width:&quot;10&quot;, height:&quot;10&quot;, bgcolor:&quot;0xff0000&quot;});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var canvas_click = new myshow (mywindow, { x:canvas.getMouse(&#39;x&#39;), y:canvas.getMouse(&#39;y&#39;), <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width:&quot;12&quot;, height:&quot;12&quot;, bgcolor:&quot;0x00ff00&quot;});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var local_click = new myshow (mywindow, { x:mywindow.getMouse(&#39;x&#39;), y:mywindow.getMouse(&#39;y&#39;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width:&quot;10&quot;, height:&quot;10&quot;, bgcolor:&quot;0x0000ff&quot;});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.write(&#39;Local onclick canvas_click(green) x:&#39; + canvas_click.x + &#39; y:&#39; + canvas_click.y + <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &#39;; local_click(blue) x:&#39; + local_click.x + &#39; y:&#39; + local_click.y);
<br>&nbsp;&nbsp;&nbsp; &lt;/handler&gt; <br>&nbsp; &lt;/window&gt;<br>&lt;/canvas&gt;