From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aGraphics.Height

Supported for all project types and targets.

The height in pixels of the parent object, typically a Canvas control or a Window.


For example, if the graphics class object is in a Canvas control, Height returns the height of the control.


This example in the Canvas.Paint event draws a box the height of the Canvas itself:

g.DrawingColor = &c0000ff
g.FillRectangle(0, 0, g.Width, g.Height)