Input 是基础文本输入控件。
import win.ui;
/*DSG{{*/
var winform = win.form(text="AntdUI Input";right=520;bottom=260)
winform.add(
inputHost={cls="custom.edit";left=40;top=40;right=380;bottom=80;z=1}
)
/*}}*/
import dotNet.AntdUI;
var input = AntdUI.Input(winform.inputHost);
input.PlaceholderText = "请输入用户名";
input.AllowClear = true;
input.PrefixText = "用户";
input.MaxLength = 32;
input.TextChanged = function(sender,e){
// sender.Text 为当前文本
}
winform.show();
win.loopMessage();
Text:输入内容。PlaceholderText:占位提示。AllowClear:显示清除按钮。Multiline / WordWrap:多行与换行。ReadOnly:只读。UseSystemPasswordChar / PasswordChar:密码输入。PrefixText/PrefixSvg、SuffixText/SuffixSvg:前后缀。Status:校验状态,使用 AntdUI.TType。input.AppendText("追加文本");
input.Clear();
input.SelectAll();
input.Copy();
input.Paste();