| Search Locate Previous Next | Contents |
This function converts from the co-ordinates returned by APL (for example in the mouse-move message) to the co-ordinate system used in the chart the mouse is currently over. It returns the result as PostScript-style XY co-ords, based at the chart origin.
xyguiobj PostScrp.D2L rc
An example is included in the RainPro workspace as part of the Edit function set:
© Follow the mouse (vertically) nm'#.',msg ª pos22msg ...... © show the user where we are (vertically) pos0.5+2nm PostScrp.D2L pos '#.pgi.lbv'WS'caption'(pos)
This is set as the mouse-move handler when the user picks up a data point to move it vertically. It gets the (row,column) position from APL (in the current user-coordinate system) in the event message, and stores it as pos. In order to show the user the potential data value which will be set when the mouse is released, it must update a status field with the new Y-value in the chart co-ordinate system. It converts to (x,y) and shows the rounded value of the second element in the status field.