Skip to content
Claude edited this page Oct 27, 2026 · 4 revisions
BlitzPlus

EventX

EventX:Int32

Returns: The X value, see the table at EventData. Positions on a canvas are relative to the canvas.

Description

Gives the first coordinate of the last event: where the mouse was for $203 and $205, and where a window went to for $801 or how wide it became for $802.

Examples

Graphics 320, 240, 32, 2
win  = CreateWindow("Mouse", 20, 20, 280, 200, Desktop(), 3)
info = CreateLabel("Move the mouse", 10, 10, 250, 30, win)
cv   = CreateCanvas(10, 50, 240, 100, win)
SetBuffer CanvasBuffer(cv)
ClsColor 120, 160, 200
Cls
FlipCanvas cv
Repeat
	e = WaitEvent()
	If e = $203 Then SetGadgetText info, "At " + EventX() + ", " + EventY()
Until e = $803

Media

EventX

Related Commands

EventData, EventID, EventSource, EventY, EventZ, PeekEvent, WaitEvent

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally