Ooui-tws-port/Ooui/TextArea.cs

47 lines
1.0 KiB
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);
}
2017-06-19 05:28:14 +00:00
public event EventHandler Inputted {
add => AddEventListener ("input", value);
remove => RemoveEventListener ("input", value);
}
2017-06-16 06:56:30 +00:00
string val = "";
public string Value {
get => val;
set => SetProperty (ref val, 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
}
}