0

点击 Bunifu Framework TextBox 那么如何调用“SelectAll()”函数呢?因为我想选择 TextBox 中的所有文本。请帮忙

4

1 回答 1

1

这是一个快速修复

//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();

                    }

                }

            }
于 2018-04-04T05:59:52.713 回答