Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limiting Total Text Length with RichText Control..
Message
 
 
To
12/01/2004 09:16:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00865949
Message ID:
00866336
Views:
20
Tim,

The maxlength property limits the number of characters that can be entered into RTF control which doesn't include RTF formatting codes. If you think about it, it does make sense because that the limit that user sees. Where the limit of 4000 charcters comes from?

>Hi,
>
>Using the richtext control I need to limit the total length including all RTF commands taht can be entered in the control to 4000.
>
>I tried setting the maxlength property to 4000 expect with all the rtf commands the actual size checked with len(this.textrtf) is much larger.
>
>Does anyone have a function that will limit the amount of text that can be entered in the way i want?
>
>I tried something like teh following in the selchange method but it just garbles the rtf...
>IF LEN(this.textRTF)>3999
>	MESSAGEBOX("Max text Length Exceeded",0+16,"QuestPDM")
>	lcText=this.textRTF
>	this.text=""
>	this.SelRTF=SUBSTR(lcText,1,3999)
>ENDIF
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform