Mouse position: Difference between revisions

Line 806:
use com.livecode.widget -- include the required module
--- in your handler:
variable tPosition as Point -- type declaration, tPosition is a rectpoint array struct, something like [0,1024,0,768]
put the mouse position into tPosition
variable tRect as Rectangle -- type declaration, tRect is a rect array struct, something like [0,1024,0,768]
put my bounds into tRect
if tPosition is within tRect then
log "mouse position is within the widget bounds"
end if
 
</lang>