Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to limit the number of lines in a memo ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00306732
Message ID:
00306903
Views:
53
Ken,

>Well, it actually is a big deal ;-) You could write a routine to parse the string into each line and tell the user if there is an error in the valid event. But then how does the user easily find their error? What if there are multiple errors?

Right. So, I should check in KeyPress.

>I understand not wanting to throw out the class that you've already spent time developing, but in the end trying to use the EditBox in this manner will not be very user friendly.

It is user friendly. I'm really the only person, who worry about validation issue for this particular case. Nobody else does, including my manager. I'm 99,9% sure that our users will type correctly. But this 0,1% doesn't allow me to calm.

>
>What functionality does your btcc_edit class provide that's preventing you from using different control(s)?

This class is responsible for user-defined criterion. It should also be save-restored class, e.g. should reflect last user input, then the form starts.
It was not a simple problem for editbox, but I already solved it.
Actually, this validation is not critical, but I want to make it perfect, what's why I asking. Of course, I don't want to create another class with textbox, list, 2 buttons, as you advised, for this criterion. I prefer to use the class I already designed.

So, please, try to advise something within existing class. We assume, that our users don't type lots of codes, just 3-5 as a maximum.

>>Ken,
>>
>> Your advise is similar Ed's advise. But I really don't want to switch and create another class for this, because I already designed class btcc_edit. I also want to avoid additional buttons Add/Remove.
>> Besides, input mask may provide 99999, but user still can type less than 5 digits, so this approach still requires additional checking.
>>
>> So, as I said from the beginning, I don't want to change from editbox to grid or textbox, etc. I want to use existing classes and existing objects on the form (because I have already two of them). I ask about how can I validate the user's input in this particular case of editbox. I really don't think that it's a big deal.
>>'
>>
>>
>>>Have you considered using a combination of a TextBox with an input mask for input, a set of add/remove buttons and a listbox?
>>>
>>>The user would type in the zipcode in the TextBox where it could be easily validated, then click the Add button to add it to the ListBox. Remove would be used to remove items from the listbox.
>>>
>>>>Ken,
>>>>
>>>>>Is the EditBox bound to a memo field?
>>>>
>>>> No. I just want to use user's input for selection criterion. That's it. No bound to.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform