/// <summary> /// Adds a new button to the control with a specified name /// </summary> /// <param name="buttonName">The name to appear on the button</param> /// <returns>Returns the Button object created</returns> public IButton AddButton(string buttonName) { IButton button = _buttonGroupControlManager.AddButton(buttonName); ButtonSizePolicy.RecalcButtonSizes(_buttonGroupControlManager.LayoutManager.ManagedControl.Controls); return(button); }
/// <summary> /// Adds a new button to the control with a specified name, specified text and /// with an attached event handler to carry out /// further actions if the button is pressed /// </summary> /// <param name="buttonName">The name that the button is created with</param> /// <param name="buttonText">The text to appear on the button</param> /// <param name="clickHandler">The method that handles the Click event</param> /// <returns>Returns the Button object created</returns> public IButton AddButton(string buttonName, string buttonText, EventHandler clickHandler) { IButton button = _buttonGroupControlManager.AddButton(buttonName, buttonText, clickHandler); ButtonSizePolicy.RecalcButtonSizes(_buttonGroupControlManager.LayoutManager.ManagedControl.Controls); return(button); }