Thanks to all on this. Looks like no getting around coding, but alas, that's why we're here. I'm going to first try the InteractiveChange since that should only get fired if the value changes.
Maybe I should add this to the Wish List, as small as it is, I would think the Fox Team could do it rather easily.
- Brian
>Hi Brian,
>
>I have Input Classes in Download section here. It's not exactly, what you're asking, but you can borrow the idea.
>
>Here is KeyPress event of my composite class:
>
>lparameters nKeyCode, nShiftAltCtrl
>local lcValue
>lcValue=alltrim(this.value)
>if nKeyCode=13
> with this.parent.parent
> .validate(m.lcValue)
> if .AllowAdd
> .Container1.AddRemove1.cmdAdd.click()
> .Container1.Command1.Refresh()
> .Container1.List1.Refresh()
> endif
> endwith
> nodefault
>endif
>
>And here is validate method in the form instance of this class:
>
>lparameters tcValue
>if len(m.tcValue) <> this.FieldLen
>* Problem didn't fill the field
> =messagebox('You should type '+alltrim(str(this.FieldLen))+' digits only!',48,'Warning...')
> this.AllowAdd=.f.
> return 0
>else
> return dodefault(m.tcValue)
>endif
>
>I'm also using InputMax property of the textbox...
VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)
www.wulfsden.com