单击,然后如何调用"SelectAll()“函数?因为我想选择TextBox中的所有文本。请帮帮忙
发布于 2018-04-04 05:59:52
这里有一个快速的解决方法
//replace (Bunifu.Framework.UI.BunifuMaterialTextbox) with your specified type of textbox
private void SelectAll(Bunifu.Framework.UI.BunifuMaterialTextbox metroTextbox)
{
foreach (var ctl in metroTextbox.Controls)
{
if (ctl.GetType() == typeof(TextBox))
{
var txt = (TextBox)ctl;
txt.SelectAll();
}
}
}https://stackoverflow.com/questions/49596839
复制相似问题