[Gambas-user] TextArea automatic CRLF
Rolf-Werner Eilert
rwe-sse at osnanet.de
Wed Nov 22 08:35:25 CET 2017
Am 21.11.2017 18:55, schrieb mikeB:
> eGreetings to the World of Gambas,
>
> Am in the process of developing a 'newsletter email sender'
> using the SMTP component - with a TextArea field as the
> message editor. Going to be used to send out a 'what's new'
> opted-in mailing list to my clients.
>
> I realize there are lots of this type software on the iNet
> (i.e. Mail Monkey) but I don't like the fact that my mailing
> list would be stored on "the cloud" - a security thing.
>
> What I am trying to do is code it so that if a line is say
> 80 chars long then it automatically inserts a carriage return/
> next line function (i.e. chr(13) & chr(10) ? ) so that "what
> you see is what you get" instead on the line just going on
> forever - making the email message look tacky...
>
> I've been playing around with the "change" "wrap" and "line"
> functions but can't seem to find a way to do this OTHER THEN
> actually pressing the 'ENTER' key at the end of each line
> (which seems to work - via my testing).
>
> I'm missing something - most likely simple - but if anyone knows
> and has a few minutes to advise me what to look at - I'd GREATLY
> APPRECIATE your mentor-ship ;-)
>
> Have a GREAT day,
> mikeB
>
>
Moin,
First advice: Use String.Len() (not Len) to measure the length of strings.
Second: In Linux, it is LF only, and as far as I understand, Windows
seems to at least accept this too, meanwhile.
Then I send you a project of mine. It is a tool our students use to
learn typewriting. There is a TextArea, and you can see how I managed to
make it behave like a typewriter. Take a look at TextArea_KeyPress
This is not precisely what you are looking for, but maybe it can inspire
your code.
Regards
Rolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MSyb-0.0.57.tar.gz
Type: application/x-gzip
Size: 36903 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20171122/5dfeee52/attachment-0001.bin>
More information about the User
mailing list