We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CurrencyTextBox with format say (0.00) sets the cursor on the extreme left

Thread ID:





36317 Oct 26,2005 04:46 PM UTC Oct 31,2005 01:43 PM UTC WinForms 1
Tags: Tools
Asked On October 26, 2005 04:46 PM UTC

I have a CurrencyTextBox with format to display (0.00). On entering the CurrencyTextBox the cursor is put to the extreme left and when someone enters 1.22 for example using the keyboard the value of 10.22 gets put in. I used the SelectAllOnFocus property to true, this fixed the problem partly. However when someone enters the CurrencyTextBox and hits a delete and then enters the value of 1.22 we get 10.22 again. This however works when the user hits a backspace in the cell. I tried using the ProcessCmdKeys, KeyPress, KeyDown events to catch the delete key without success


Anupama Roy [Syncfusion]
Replied On October 31, 2005 01:43 PM UTC

Hi Arun, I am able to reproduce this problem in also.However, we can derive from the CurrencyTextBox and handle its ProcessCmdKey method as shown below : public class CurrencyTextBoxCustom:Syncfusion.Windows.Forms.Tools.CurrencyTextBox { protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) { if(msg.WParam.ToInt32() == (int) Keys.Delete ) { SendKeys.Send("{BackSpace}"); return true; } return base.ProcessCmdKey(ref msg, keyData); } } Please see the sample attached and let me know whether this helps you. Thanks for your interest in Syncfusion products, Regards, Anu.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon