Class TextAreaView
public sealed class TextAreaView : AbstractView
Inherited Members
Namespace: HomeSeer.Jui.Views
Assembly: PluginSdk.dll
A text area view is an editable text box for the user to enter a large volume of text
Constructors
View SourceTextAreaView(String, String, Int32)
Create a new instance of an TextAreaView with an ID, a Name, and the number of rows.
Declaration
[JsonConstructor]
public TextAreaView(string id, string name, int rows = 5)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The unique ID for the View |
System.String | name | The name of the View |
System.Int32 | rows | The number of text rows in the text area. DEFAULT: 5 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when the number of rows is set to an invalid value |
TextAreaView(String, String, String, Int32)
Create a new instance of an TextAreaView with an ID, a Name, a Value, and the number of rows.
Declaration
public TextAreaView(string id, string name, string value, int rows = 5)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The unique ID for the View |
System.String | name | The name of the View |
System.String | value | The value inputted into the field |
System.Int32 | rows | The number of text rows in the text area. DEFAULT: 5 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when the number of rows is set to an invalid value |
Fields
View Source_rows
Declaration
int _rows
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
View SourceRows
The number of text rows displayed. Must be >= 1
Declaration
[JsonProperty("rows")]
public int Rows { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when the number of rows is set to an invalid value |
Value
The current value of the field
Declaration
[JsonProperty("value")]
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceGetStringValue()
Get the value associated with this view as a string if there is one.
Declaration
public override string GetStringValue()
Returns
Type | Description |
---|---|
System.String | The value stored in this view as a string or NULL if there is no value stored. |
Overrides
Remarks
The same as Value
ToHtml(Int32)
Get a string representation of this view converted into HTML
Declaration
public override string ToHtml(int indent = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | indent |
Returns
Type | Description |
---|---|
System.String | An HTML representation of the view as a string |
Overrides
View SourceUpdate(AbstractView)
Update the view to the new state. This will change the inputted value
Declaration
public override void Update(AbstractView newViewState)
Parameters
Type | Name | Description |
---|---|---|
AbstractView | newViewState | The new state of the view being updated. This view's ID and Type must match the calling view exactly |
Overrides
Exceptions
Type | Condition |
---|---|
ViewTypeMismatchException | Thrown when the new view's class doesn't match the calling view |
UpdateValue(String)
Update the value of the view
Declaration
public override void UpdateValue(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The new value |