rgreat Posted January 13, 2016 Posted January 13, 2016 Screenshot attached. procedure TProgressDlg.AddToLog(Text: string); begin Memo1.Lines.Add(Text); end; Quote
Sherzod Posted January 13, 2016 Posted January 13, 2016 Hi, Well, as you know, this is "default behavior" of "Memo VCL", this line will be ignored when called "Count" If you delete a "line break", the behavior UniMemo1.Lines.Add will be different, the text will be added to the end of the line... Best regards. Quote
rgreat Posted January 13, 2016 Author Posted January 13, 2016 Ok, i used workaround... procedure TProgressDlg.AddToLog(Text: string); begin Memo1.Lines.Insert(0,Text); end; Quote
Sherzod Posted September 10, 2021 Posted September 10, 2021 11 minutes ago, Daha Software said: On 1/13/2016 at 8:58 PM, Sherzod said: Well, as you know, this is "default behavior" of "Memo VCL", this line will be ignored when called "Count" If you delete a "line break", the behavior UniMemo1.Lines.Add will be different, the text will be added to the end of the line... On 1/13/2016 at 10:47 PM, rgreat said: Ok, i used workaround... procedure TProgressDlg.AddToLog(Text: string); begin Memo1.Lines.Insert(0,Text); end; Quote
SISBLU Software Posted September 10, 2021 Posted September 10, 2021 Not work! When I insert a new line, in the memo it adds a blank ending line. Problem is that when writing to the database, it is always writing this blank line Quote
Sherzod Posted September 10, 2021 Posted September 10, 2021 4 minutes ago, Daha Software said: Problem is that when writing to the database, it is always writing this blank line Are you using UniMemo or UniDBMemo? Quote
SISBLU Software Posted September 10, 2021 Posted September 10, 2021 UniMemo , but UniMainModule.IBQCFEOBS.Text:=UniMemo4.Lines.Text But it happens with both components. If I use DBMEMO without any blank ending lines and save to the database, it adds a blank ending line Quote
rgreat Posted September 10, 2021 Author Posted September 10, 2021 TrimRight(UniMemo4.Lines.Text) ? 😅 1 1 Quote
SISBLU Software Posted September 10, 2021 Posted September 10, 2021 Perfect... Remove spaces at the beginning and end of text (including blank lines): UniMainModule.IBQCFEOBS.Value:= TrimLeft(TrimRight(UniMemo4.Lines.Text)); --------- TMEMOFIELD use: UniMainModule.IBQPROTOCOLOLINHAS.AsString:= TrimLeft(TrimRight(IBQPROTOCOLOLINHAS.AsString)); 1 Quote
rgreat Posted September 12, 2021 Author Posted September 12, 2021 On 9/10/2021 at 7:39 PM, Daha Software said: TrimLeft(TrimRight(UniMemo4.Lines.Text)); 1. This is equal to Trim(UniMemo4.Lines.Text) 2. TrimLeft is unsafe. It will remove leading spaces in the first line, for example. That's why I only used TrimRight instead of Trim. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.