Class Label
Label widget, displays a string at a given position, can include multiple lines.
Inherited Members
Namespace: Terminal
Assembly: Terminal.dll
Syntax
public class Label : Terminal.View
Constructors
Label(Rect, String)
Public constructor: creates a label at the given coordinate with the given string and uses the specified frame for the string.
Declaration
public Label (Terminal.Rect rect, string text);
Parameters
Type | Name | Description |
---|---|---|
Rect | rect | To be added. |
System.String | text | To be added. |
Label(Int32, Int32, String)
Public constructor: creates a label at the given coordinate with the given string, computes the bounding box based on the size of the string, assumes that the string contains newlines for multiple lines, no special breaking rules are used.
Declaration
public Label (int x, int y, string text);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | To be added. |
System.Int32 | y | To be added. |
System.String | text | To be added. |
Properties
Text
The text displayed by this widget.
Declaration
public virtual string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | To be added. |
TextAlignment
Controls the text-alignemtn property of the label, changing it will redisplay the label.
Declaration
public Terminal.TextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment | The text alignment. |
TextColor
The color used for the label
Declaration
public Terminal.Attribute TextColor { get; set; }
Property Value
Type | Description |
---|---|
Attribute | To be added. |
Methods
MeasureLines(String, Int32)
Computes the number of lines needed to render the specified text by the Label control
Declaration
public static int MeasureLines (string text, int width);
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text, may contain newlines. |
System.Int32 | width | The width for the text. |
Returns
Type | Description |
---|---|
System.Int32 | Number of lines. |
Redraw(Rect)
Declaration
public override void Redraw (Terminal.Rect region);
Parameters
Type | Name | Description |
---|---|---|
Rect | region | To be added. |