Re: Control on Form for numeric values
- From: S Bans <SBans@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 27 Jul 2008 18:35:19 -0700
Thanks Fred,
As per your guidance I wrote :
if MOD(this.Value,this.Increment) < (this.Increment/2)
this.Value = this.Value - MOD(this.Value,this.Increment)
else
this.Value = (this.Value - MOD(this.Value,this.Increment))+this.Increment
endif
It is working like a charm.
Thanks for taking time to provide guidance.
With Regards
S Bans
"Fred Taylor" wrote:
You'd be better off with something liike this in the .Valid of the Spinner:.
this.Value = this.Value - MOD(this.Value,this.Increment)
--
Fred
Microsoft Visual FoxPro MVP
"S Bans" <SBans@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FBDEA88E-63DA-40B5-A091-76AD3521B590@xxxxxxxxxxxxxxxx
Thanks Fred,
Your suggestion gave the desired results.
Can you please suggest, what will be the efficient way to ensure that the
values in the Spinner Object remains in multiples of 0.05 even if
ProgramaticChange or InteractiveChange event results in the value not
being
in multiples of 0.05
With regards
S Bans
"Fred Taylor" wrote:
Use a Spinner object and be sure to set the initial .Value property to
include the 2 decimal places and the .Increment property to 0.05 is all
you
should have to do.
--
Fred
Microsoft Visual FoxPro MVP
"S Bans" <SBans@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:82AFAC53-5A08-450F-AA10-5756E721916C@xxxxxxxxxxxxxxxx
Hello,
I have a form. I am looking forward to have a control on this form,
which
can accept Positive, numeric values with two decimal places (May be
TextBox
should do). However I have not been successful in implementing it. I am
looking forward to guidance of seniors for implementing it.
It will be nicer if you can guide me about implementing it in such a
manner,
that it rounds the values in multiples of 0.05 and Up & down arrows
increment
or decrement the values in multiples of 0.05.
Please accept my thanks for your help.
With Regards
S Bans
- References:
- Re: Control on Form for numeric values
- From: Fred Taylor
- Re: Control on Form for numeric values
- From: S Bans
- Re: Control on Form for numeric values
- From: Fred Taylor
- Re: Control on Form for numeric values
- Prev by Date: Re: Control on Form for numeric values
- Next by Date: Re: Any future for Foxpro: Do I switch?
- Previous by thread: Re: Control on Form for numeric values
- Next by thread: Looking for VFP developer
- Index(es):
Relevant Pages
|