Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spinner control does not display correctly

Status
Not open for further replies.

psperry2

Programmer
Nov 7, 2007
141
US
I have an application where a spinner control is used for entering a percentage for later calculations of bonus pay.
I have the following proerties set

Controlsource p_nPercent
Increment 0.25
inputmask 999.99
keyboardhighvalue 200
keyboardlowvalue 0
spinnerHighvalue 200.00
spinnerLowValue 0.00

The problem is that clicking on the spinner up or down does not display the correct value. 5.25, 5.00, 4.75, 4.50 all display as 5.00

I need to not see a rounded value but the actual value
 
This seems to depend on how you've defined p_nPercent. If I use a field with 2 decimal places then I see 2 decimals in the spinner. If I use a memory variable defined as:
Code:
p_nPercent = 0
then I see what you describe. If I use a memory variable defined as:
Code:
p_nPercent = 0.00
then I see 2 decimal places again. This seems to override InputMask.


Geoff Franklin
 
Thanks Geoff, your answer was a part of the solution. The other part was to "set fixed on
 
I almost have what I need. The problem is that the form I have the spinner control on displays 5.00 when the value is actuallt 4.50 But this only happens on the initial use of the form, the next time, the spinner displays 4.50

I opened a dubug window and looked at the properties of the spinner when it was displaying incorrectly and correctly.

The "text" property when displaying 4.50 was 5.00 when displaying incorrectly. The "Text" property was 4.50 when it displays correctly.

I am stumped when trying to get this spinner to disply the correct value all the time.
 
This appears to be a known bug in Version 7.0 and earlier.
The spinner control will not display correctly when the increment is less than one. I am using .25
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top