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.
Unfortunately, activation email could not send to your email. Please try again.

Calculator Format and Focus

Thread ID:

Created:

Updated:

Platform:

Replies:

68738 Sep 30,2007 06:30 PM Dec 26,2007 12:09 AM Windows Forms 3
loading
Tags: Tools
Qingde Shi
Asked On September 30, 2007 06:30 PM

Hi,

I have to question about the Calculator control.

1. Number Format. How to display the value with commas for thousands, but show all the digits after decimal point. like, 1234.56789012 would show as 1,234.56789012

2. Say, place the calculator control and a Button control on a form,. after click the button, how to make the calculator control to continue receiving input from key pads? tried to set focus back, but no help.

Thanks,

Q

Administrator [Syncfusion]
Replied On October 1, 2007 08:58 AM

Hi Q,

Thank you for your interest in Syncfusion products.

Numeric format :
----------------

The calculator control by default does not allow the use of 'NumberGroupSeparator' like in DoubleTextBox. So to achieve this, we need to derive the CalculatorControl and override the 'CreateCalculatorDisplayBox' method.

Send focus back to Calculator :
--------------------------------

For this, please call focus method of calculator.

[C#]
CalculatorControl.Controls[0].Focus();

The below sample accomplishes the above changes. Please look at the attached sample and let me know if this meets your requirement.

http://websamples.syncfusion.com/samples/Tools.Windows/F68738/main.htm

Regards,
Jaya

Qingde Shi
Replied On October 1, 2007 09:19 AM

Hi Jaya,

Thanks.

The Controls[0].Focus() did the trick.

as for the format, number of decimal should be dynamic, I am not sure the method in your sample would work for all the cases.

Thanks again.

Q

Administrator [Syncfusion]
Replied On December 26, 2007 12:09 AM

Hi Q,

Please let me know if the above provided details helps you to resolve the issue and provide me more information in which cases it will not help that would help us to provide you a solution.

Regards,
Jaya


CONFIRMATION

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.

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.

;