Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to limit the number of lines in a memo ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00306732
Message ID:
00306850
Vues:
44
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.




>>Hi Ken,
>>
>> I'm afraid you misunderstood me, because I've not started a new thread and continued here.
>>
>> My problem is not restrict input to 6 lines. I want that my users type 5 digits in each line, like
>>11111
>>22222
>>33333
>>44444,
>>etc.
>>
>> If they type :AAAAA - it's a bad input or if they type 1111 - it's also a bad input, because I want to use this editbox for zipcodes, so it must be 5 digits.
>>
>> Now I hope you understand my problem.
>>
>> I discuss this in other day and Ed Pikman advised to use Grid instead of EditBox. But this approach requeres lot of modifications in my current, and I was trying to avoid unnecessary complexity. I already make an addition in VFP7 wish list about InputMask for editbox. Since now we haven't this property, I should do some checking in Valid method, right?
>>Or it could be KeyPress?
>>
>>Anyway, your ideas are greatly appreciated. Right now I decided just not to check, but this is still in my mind...
>>
>>
>>>
>>>You can use the valid, and ErrorMessage events:
>>>
>>>
* Edit1.Valid()
>>>
>>>return 	occurs(chr(13),this.value)=5
>>>
>>>* Edit1.ErrorMessage
>>>if occurs(chr(13),this.value) >5
>>>	wait window 'You may enter only 6 lines' nowait
>>>else
>>>	wait window 'You must enter at least 6 lines' nowait
>>>endif
>>>
>>>>Hi Ken,
>>>>
>>>> Continue the theme of editbox, how can I check that users type 5 and only 5 digits in each line? If not, display a warning message and stop.
>>>>
>>>>TIA
>>>>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform