Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stopping typed text in a combobox - can it be done?
Message
From
05/10/2001 00:35:01
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00564438
Message ID:
00564624
Views:
17
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 && Enter
>	with this.parent.parent && Btcc_list
>		.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
Previous
Reply
Map
View

Click here to load this message in the networking platform