This is a migrated thread and some comments may be shown as answers.

Radspin editor

3 Answers 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ofer
Top achievements
Rank 1
ofer asked on 26 Aug 2018, 07:45 PM

Hello guys,

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

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 28 Aug 2018, 02:14 PM
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.
0
ofer
Top achievements
Rank 1
answered on 28 Aug 2018, 07:36 PM

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?

0
Hristo
Telerik team
answered on 29 Aug 2018, 10:09 AM
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.
Tags
General Discussions
Asked by
ofer
Top achievements
Rank 1
Answers by
Hristo
Telerik team
ofer
Top achievements
Rank 1
Share this question
or