Radspin editor

4 posts, 0 answers
  1. ofer
    ofer avatar
    3 posts
    Member since:
    Jul 2018

    Posted 26 Aug 2018 Link to this post

    Hello guys,

    There is a way to creating a radspin editor like in the picture attached?

  2. Hristo
    Admin
    Hristo avatar
    1521 posts

    Posted 28 Aug 2018 Link to this post

    Hello Ofer,

    Thank you for writing.

    We are using a similar user control in the Watermark dialog used by our printing engine. This control is not displayed in the toolbox, but you can inherit it and change its ToolboxItem attribute: Additionally, you can may want to change its minimum, maximum and format string as they are set internally to suit the needs of the Watermark dialog: 
    [ToolboxItem(true)]
    public class CustomPlusMinusEditor : PlusMinusEditor
    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
     
            this.FormatString = "{0:F1}";
            this.MaxValue = 100;
            this.MinValue = -100;
        }
    }

    I hope this will help. Let me know if you need further assistance.

    Regards,
    Hristo
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. ofer
    ofer avatar
    3 posts
    Member since:
    Jul 2018

    Posted 28 Aug 2018 in reply to Hristo Link to this post

    Hello Hristo.

    thank you for your response.

    i need a bit more details about the watermark dialog and the toolboxitem

    how can i customize the button like in the picture?

  4. Hristo
    Admin
    Hristo avatar
    1521 posts

    Posted 29 Aug 2018 Link to this post

    Hi Ofer,

    You can use the custom user control and access the button elements and apply a shape to them: 
    this.PlusButton.ButtonElement.Shape = new RoundRectShape(5);
    this.MinusButton.ButtonElement.Shape = new RoundRectShape(5);

    Additionally, you may need to also change the back color of the buttons as well as that of the text box. Please note that this is not a standalone RadControl but rather a user control built with other controls like the buttons and the textbox in it. It is developed only to serve the needs of the Watermark Preview dialog, however, if you build it with the ToolboxItem attribute set to true you will be able to use it separately. I am also attaching a screenshot showing the result on my end.

    Regards,
    Hristo
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top