RectControl.RefreshRect

From Xojo Documentation

Method

RectControl.RefreshRect(X As Integer, Y As Integer, Width As Integer, Height As Integer[,EraseBackground as Boolean])

Supported for all project types and targets.

Immediately repaints only the region of the RectControl specified by the X, Y, Width, and Height parameters. If the optional parameter EraseBackground is True, the background will be erased prior to redrawing the area. The default is True.

Notes

Calling this frequently can cause the code executing to slow down. It is often preferable to call RectControl.Invalidate instead.

Example

The following refreshes the specified region of the control.

Me.RefreshRect(0, 0, Me.Width / 2, Me.Height / 2)