【发布时间】:2018-09-10 19:38:07
【问题描述】:
点击Bunifu Framework TextBox 怎么调用“SelectAll()”函数呢?因为我想选择 TextBox 中的所有文本。请帮忙
【问题讨论】:
点击Bunifu Framework TextBox 怎么调用“SelectAll()”函数呢?因为我想选择 TextBox 中的所有文本。请帮忙
【问题讨论】:
这是一个快速修复
//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();
}
}
}
【讨论】: