Updating text with Spaces in RichEditCtrl
-
Hi All!!! I Had A strange requirement regarding RichEditCtrl. I need to Limit the TextLength(Max Charecters) in Each Line of Richeditctrl to 50.In addition to that i need to insert spaces after every 10 charecters in each line.so in each Line Altogether 5 spaces will be there. In case if user added,deleted,modified charecters the alignment with spaces should not change..this is my requirement.I tried USing LineLength but notreaching my requirement. Thanks:doh: If you have faith in the cause and the means and in God, the hot Sun will be cool for you.
-
Hi All!!! I Had A strange requirement regarding RichEditCtrl. I need to Limit the TextLength(Max Charecters) in Each Line of Richeditctrl to 50.In addition to that i need to insert spaces after every 10 charecters in each line.so in each Line Altogether 5 spaces will be there. In case if user added,deleted,modified charecters the alignment with spaces should not change..this is my requirement.I tried USing LineLength but notreaching my requirement. Thanks:doh: If you have faith in the cause and the means and in God, the hot Sun will be cool for you.
In that case, you need to store all the characters that aren't spaces, and ignore spaces altogether. Then you need when you display your text to insert the spaces where you need them. There's no point having them as part of the underlying string, if they have to always be there, it's actually a display issue, not an issue of the string value. I guess the best way to do that is to derive a class from the RichEditControl. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer