Search code examples
c#bunifu

Bunifu Framework "Text Box" SelectAll function missing?


Click on the Bunifu Framework TextBox then how can call the "SelectAll()" function? Because I want to select all text in the TextBox. Please help


Solution

  • Here is a quick fix

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