Table of Contents

Method SetAttributeForRole

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

SetAttributeForRole(VisualRole)

Selects the Attribute associated with the specified VisualRole as the Attribute to use for subsequent calls to AddRune(Rune) and AddStr(string).

Calls GetAttributeForRole(VisualRole) to get the Attribute associated with the specified role, which will raise OnGettingAttributeForRole(in VisualRole, ref Attribute)/GettingAttributeForRole.

public Attribute? SetAttributeForRole(VisualRole role)

Parameters

role VisualRole

The semantic VisualRole describing the element being rendered.

Returns

Attribute?

The previously set Attribute.