Topic: Adding new line in Memo

Hello thezimguy, Derek, Sibprogsistem, Dmitry and all MVD users

I want to add a line break when I press ENTER on the keyboard in Memo field.

In sending an email, even though visually there line breaks when you press ENTER in a Memo field, the text sends without adding the line breaks..


Thank you in advance for your immense support

Re: Adding new line in Memo

humblelion wrote:

Hello thezimguy, Derek, Sibprogsistem, Dmitry and all MVD users

I want to add a line break when I press ENTER on the keyboard in Memo field.

In sending an email, even though visually there line breaks when you press ENTER in a Memo field, the text sends without adding the line breaks..


Thank you in advance for your immense support

как Вы отправляете сообщение?
how do you send the message?

Re: Adding new line in Memo

sibprogsistem wrote:

как Вы отправляете сообщение?
how do you send the message?

Post's attachments

Attachment icon sms.png 122.78 kb, 114 downloads since 2020-07-29 

Re: Adding new line in Memo

sibprogsistem wrote:

как Вы отправляете сообщение?
how do you send the message?

This is the output/result after sending content in Memo

Post's attachments

Attachment icon result.jpg 54.01 kb, 106 downloads since 2020-07-29 

Re: Adding new line in Memo

это проблема на стороне вашего сервиса SMS сообщений...  обычно SMS сообщения посылаются одной строкой...
SMSAero может делать разрыв строки  https://smsaero.ru/blog/post/dobavlena- … oki-v-sms/
 
 
 
this is a problem on the side of your SMS messaging service ... usually SMS messages are sent in one line ...
SMSAero can do line break   https://smsaero.ru/blog/post/dobavlena- … oki-v-sms/

Re: Adding new line in Memo

sibprogsistem wrote:

 
 
this is a problem on the side of your SMS messaging service ... usually SMS messages are sent in one line ...
SMSAero can do line break   https://smsaero.ru/blog/post/dobavlena- … oki-v-sms/

Sibprogsistem, please help me create a hotkey for ENTER key such that onclick, it adds /r/n to memo text. Thank you my brother for always assisting me.

7 (edited by sibprogsistem 2020-07-29 22:44:02)

Re: Adding new line in Memo

procedure Form1_Memo1_OnKeyDown (Sender: TObject; var Key: Word; Shift, Alt, Ctrl: boolean);
var
s:string;
begin
  if Key = 13 then begin
  //s := Form1.Memo1.Text;
  //s := ReplaceStr(s,#13#10,'');
  //Form1.Memo1.Text:= s;
  Form1.Memo1.Text:=Form1.Memo1.Text + '/ r / n ';
  Form1.Memo1.SelStart:=Form1.Memo1.GetTextLen;
  end;
end;
Post's attachments

Attachment icon test.7z 2.36 kb, 231 downloads since 2020-07-30 

Re: Adding new line in Memo

sibprogsistem wrote:
procedure Form1_Memo1_OnKeyDown (Sender: TObject; var Key: Word; Shift, Alt, Ctrl: boolean);
var
s:string;
begin
  if Key = 13 then begin
  //s := Form1.Memo1.Text;
  //s := ReplaceStr(s,#13#10,'');
  //Form1.Memo1.Text:= s;
  Form1.Memo1.Text:=Form1.Memo1.Text + '/ r / n ';
  Form1.Memo1.SelStart:=Form1.Memo1.GetTextLen;
  end;
end;

Thank you so much for the quick reponse. You are my all time favorite. Thank you once again

9 (edited by vovka3003 2020-07-30 11:38:07)

Re: Adding new line in Memo

sibprogsistem wrote:

это проблема на стороне вашего сервиса SMS сообщений...

...
Form1.Memo1.Text:=Form1.Memo1.Text + '/ r / n ';
...

Это не "проблема сервиса", а пробел в знаниях стандартов. У каждого адекватного смс-сервиса имеется прием кодированной строки. Если запрос типа "GET" и ContentType = x-www-form-urlencoded, значит перенос должен выглядеть как %0D%0A, если запрос "POST", то как правило применяется json-формат и текст Memo-поля передается в тело запроса "как есть"...

Re: Adding new line in Memo

vovka3003 wrote:

Это не "проблема сервиса", а пробел в знаниях стандартов. У каждого адекватного смс-сервиса имеется прием кодированной строки. Если запрос типа "GET" и ContentType = x-www-form-urlencoded, значит перенос должен выглядеть как %0D%0A, если запрос "POST", то как правило применяется json-формат и текст Memo-поля передается в тело запроса "как есть"...

ясно!  просто я прочитал это - Мы продолжаем обновлять личный кабинет и делать его более функциональным. Вчера мы добавили возможность переносить текст SMS на новую строку.
и решил, что не все имеют такую возможность..

Re: Adding new line in Memo

Эта новость касается только рассылки через личный кабинет (т.е. - API здесь ни при чем).