'Display the spin buttons on the right WebTextEditor1.Buttons.SpinButtonsDisplay = Infragistics.Web.UI.EditorControls.ButtonDisplay.OnRight
WebTextEditor™ provides the option to spin through a list of values using spin buttons. You can display the spin buttons by setting the SpinButtonsDisplay property to either OnRight or OnLeft. By default, this property is set to None. The spin buttons have two buttons: lower and upper so that your end users can move to the next and previous values. You can customize the lower and upper buttons by setting the LowerSpinButton and UpperSpinButton properties respectively.
You can set the SpinButtonsDisplay property either using Microsoft® Visual Studio® Property Window or by using the following code:
In Visual Basic:
'Display the spin buttons on the right WebTextEditor1.Buttons.SpinButtonsDisplay = Infragistics.Web.UI.EditorControls.ButtonDisplay.OnRight
In C#:
//Display the spin buttons on the right WebTextEditor1.Buttons.SpinButtonsDisplay = Infragistics.Web.UI.EditorControls.ButtonDisplay.OnRight;
WebTextEditor allows you to add a list of values that you want to iterate through using the Buttons object’s ListOfValues property. You can set the ListOfValues property either using Microsoft® Visual Studio® Property Window or by using the following code:
In Visual Basic:
WebTextEditor1.Buttons.ListOfValues = "ASP.NET Controls|Windows Forms Controls|WPF Controls|Silverlight"
In C#:
WebTextEditor1.Buttons.ListOfValues = "ASP.NET Controls|Windows Forms Controls|WPF Controls|Silverlight";
However you can also insert values into the list using the InsertListValueAtIndex method of the TextEditorButtons object.
In Visual Basic:
'Insert the values into the list at a particular index WebTextEditor1.Buttons.InsertListValueAtIndex(0, "ASP.NET Controls") WebTextEditor1.Buttons.InsertListValueAtIndex(1, "Windows Forms Controls") WebTextEditor1.Buttons.InsertListValueAtIndex(2, "WPF Controls") WebTextEditor1.Buttons.InsertListValueAtIndex(3, "Silverlight")
In C#:
//Insert the values into the list at a particular index WebTextEditor1.Buttons.InsertListValueAtIndex(0, "ASP.NET Controls"); WebTextEditor1.Buttons.InsertListValueAtIndex(1, "Windows Forms Controls"); WebTextEditor1.Buttons.InsertListValueAtIndex(2, "WPF Controls"); WebTextEditor1.Buttons.InsertListValueAtIndex(3, "Silverlight");