GetLine and GetItem problem

General TRichView support forum. Please post your questions here
Post Reply
retwas
Posts: 39
Joined: Tue May 21, 2013 1:41 pm

GetLine and GetItem problem

Post by retwas »

Hello,

I have richview with this:
line1
line2
line3

name - service
on delphi I use GetItemText:

Code: Select all

GetItemText(0) = line1
GetItemText(1) = line2
GetItemText(2) = line3
GetItemText(3) = ''
GetItemText(4) = name
GetItemText(5) = - service
How can I get the whole line 5 ? (name - service) ?

Thanks
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The ItemNo-th item starts a new paragraph, if IsParaStart(ItemNo) returns True. Otherwise, it is added to the same paragraph as the previous item.

(probably, it's better to use IsFromNewLine instead of IsParaStart; it returns true not only when the item starts a paragraph, but also if the item starts a line inside the paragraph (this kind of break may be added with Shift+Enter))
Post Reply