Table of Contents

Method SetNeedsDraw

Namespace
Terminal.Gui.ViewBase
Assembly
Terminal.Gui.dll

SetNeedsDraw()

Sets NeedsDraw to true indicating the Viewport of this View needs to be redrawn.

public void SetNeedsDraw()

Remarks

If the view is not visible (Visible is false), this method does nothing.

SetNeedsDraw(Rectangle)

Expands the area of this view needing to be redrawn to include viewPortRelativeRegion.

public void SetNeedsDraw(Rectangle viewPortRelativeRegion)

Parameters

viewPortRelativeRegion Rectangle

The viewport-local region that needs to be redrawn.

Remarks

viewPortRelativeRegion is in viewport-LOCAL coordinates: (0, 0) is the top-left visible cell of the View's Viewport. The rect does NOT include Viewport's Location (scroll offset).

The cascade to intersecting SubViews translates the region into each SubView's own viewport-local coordinates, accounting for the parent's scroll and the SubView's adornments. Viewport-local coordinates are scroll-independent, so the SubView's own Viewport Location does not affect the propagated rect.

If the view has not been initialized (IsInitialized is false), the area to be redrawn will be the viewPortRelativeRegion.