Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 10 of 16 total |
MultiEdit Line Count |
Wed, Mar 14 2018 7:30 PM | Permanent Link |
Coullie | Hi Any help gratefully received.
I have a TMultiLineEdit displaying data from my DB Server. I use #10 on the server to break up text into lines I can see the lines in the TMultilineEdit but when i query the line count this is only showing 1. Is there a way to refresh the count after adding lines dynamically or is the TMultiLineEdit separating the lines visually but still treating it as one line. |
Wed, Mar 14 2018 10:25 PM | Permanent Link |
Stephen Barker | Coullie wrote:
<<Hi Any help gratefully received. I have a TMultiLineEdit displaying data from my DB Server. I use #10 on the server to break up text into lines I can see the lines in the TMultilineEdit but when i query the line count this is only showing 1. Is there a way to refresh the count after adding lines dynamically or is the TMultiLineEdit separating the lines visually but still treating it as one line.>> TMultiLineEdit.Lines Property is a TStrings so you should be able to set TStrings.LineSeparator property to something other than the default CRLF. Steve |
Wed, Mar 14 2018 11:15 PM | Permanent Link |
Coullie | Stephen Barker wrote:
<TMultiLineEdit.Lines Property is a TStrings so you should be able to set TStrings.LineSeparator property to something other than the default CRLF.> Hi Steve thanks for the advise I tried a couple of LineSeparator's They all work and separate the text into lines. however the line count does not reflect the number of lines being visually displayed in the MultiLineEdit. The line count remains as 1 Thanks for the help. Ive implemented a work around using the copy and pos functions. |
Wed, Mar 14 2018 11:27 PM | Permanent Link |
Stephen Barker | Coullie wrote:
<<The line count remains as 1>> Interesting. Does the TMultiEdit.Lines.Count give you something different? There's a note in the help that the lines property can actually use LF only as separator. Steve |
Wed, Mar 14 2018 11:38 PM | Permanent Link |
Coullie | Stephen Barker wrote:
Coullie wrote: <<The line count remains as 1>> Interesting. Does the TMultiEdit.Lines.Count give you something different? There's a note in the help that the lines property can actually use LF only as separator. Steve Hi steve The MultiEdit.Lines.Count shows 1 even though there are multiple lines showing in the MultiEdit. i used LF. it works perfectly many lines with a count of 1 |
Thu, Mar 15 2018 12:13 AM | Permanent Link |
Rick | On 15/03/18 10:30, Coullie wrote:
> Hi Any help gratefully received. > I have a TMultiLineEdit displaying data from my DB Server. > I use #10 on the server to break up text into lines > I can see the lines in the TMultilineEdit but when i query the line count this is only showing 1. > Is there a way to refresh the count after adding lines dynamically or is the > TMultiLineEdit separating the lines visually but still treating it as one line. > If you separate each line with CR and LF then it seems to work. e.g. MultiLineEdit1.Lines.Text:='line 1'+#13+#10+'line 2'; Alternatively you can set the line separator to LF. e.g. MultiLineEidt1.Lines.LineSeparator:=#10; MultiLineEdit1.Lines.Text:='line 1'+#10+'line 2'; -- Rick |
Thu, Mar 15 2018 3:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Coullie,
<< I have a TMultiLineEdit displaying data from my DB Server. I use #10 on the server to break up text into lines >> EWB expects a CRLF (#13+#10) by default, so you will need to change the LineSeparator for the TMultiLineEdit.Lines property if you want to use LF-only (#10). Tim Young Elevate Software www.elevatesoft.com |
Thu, Mar 15 2018 5:55 PM | Permanent Link |
Coullie | Tim Young [Elevate Software] wrote:
<EWB expects a CRLF (#13+#10) by default, so you will need to change the LineSeparator for the TMultiLineEdit.Lines property if you want to use LF-only (#10).> Hi Tim and all Thanks for the advice #13+#10 #13#10 #10 LF CRLF all split my text into lines. my problem is the line count of the multiedit Ive attached a png showing the result of the following code This indicates to me that my string is correctly split into lines but the line count is still 1 var i: Integer; begin for i := 0 to MultiLineEdit1.lines.count do MultiLineEdit1.lines[i] := MultiLineEdit1.lines[i] + ' ' + IntToStr(MultiLineEdit1.lines.count); Attachments: multiedit.PNG |
Fri, Mar 16 2018 8:10 AM | Permanent Link |
Walter Matte Tactical Business Corporation | You mean: MultiLineEdit1.lines.count - 1
for i := 0 to MultiLineEdit1.lines.count - 1 do MultiLineEdit1.lines[i] := MultiLineEdit1.lines[i] + ' ' + IntToStr(MultiLineEdit1.lines.count); Walter |
Fri, Mar 16 2018 12:48 PM | Permanent Link |
Coullie | Walter Matte wrote:
<You mean: MultiLineEdit1.lines.count - 1> Yup sorry Walter. My question is still the same. Why no line count. |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, October 16, 2024 at 02:36 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |