Ooui-tws-port/Ooui/TextArea.cs

42 lines
895 B
C#
Raw Normal View History

2017-06-16 06:15:26 +00:00
using System;
namespace Ooui
{
2017-06-16 06:21:20 +00:00
public class TextArea : FormControl
2017-06-16 06:15:26 +00:00
{
public event EventHandler Changed {
add => AddEventListener ("change", value);
remove => RemoveEventListener ("change", value);
}
string text = "";
public override string Text {
get => text;
2017-06-16 06:21:20 +00:00
set => SetProperty (ref text, value ?? "", "value");
2017-06-16 06:15:26 +00:00
}
int rows = 2;
public int Rows {
get => rows;
set => SetProperty (ref rows, value, "rows");
}
2017-06-16 06:17:21 +00:00
int cols = 20;
2017-06-16 06:15:26 +00:00
public int Columns {
get => cols;
set => SetProperty (ref cols, value, "cols");
}
public TextArea ()
: base ("textarea")
{
}
2017-06-16 06:21:20 +00:00
public TextArea (string text)
: this ()
{
Text = text;
}
2017-06-16 06:15:26 +00:00
}
}