Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
WebTextEdit spinner button?
posted

Hello,

Is it possible to get spinner buttons in the WebTextEdit contol similar to the way the UltraWinGrid does it (by setting the ButtonsRight property and handling the event)?

I have a request to allow the user to press a spinner button to add or remove the same character with each press.

Thanks in advance.

Parents
No Data
Reply
  • 24497
    Suggested Answer
    posted

    Hi,

    The WebTextEdit supports spin buttons same way as WebNumericEdit. That property is invisible, because there is no default implication for WebTextEdit. You can show spin buttons at design or run time by explicit typing-in, process spin client events and modify value as you need. Below is example:

    <script type="text/javascript">
    function WebTextEdit1_Spin(oEdit, delta, oEvent)
    {
     var txt = oEdit.getText();
     if(delta > 0)
      txt += '1';
     else if(txt.length > 0)
      txt = txt.substring(0, txt.length - 1);
     oEdit.setText(txt);
    }
    </script>
    <igtxt:WebTextEdit ID="WebTextEdit1" runat="server">
     <SpinButtons Display="OnRight" />
     <ClientSideEvents Spin="WebTextEdit1_Spin" />
    </igtxt:WebTextEdit>

Children
No Data