Hello,
I want to know how much/many PageBreaks in TDBRichViewEdit (memo).
The following procedure always shows j = 0.
What's wrong ? ... =rvsBreak ?
procedure TForm1.btnTest1Click(Sender: TObject);
var i,j: integer;
begin
j:= 0;
for i := 0 to Memo.ItemCount-1 do
if Memo.GetItemStyle(i)=rvsBreak then inc(j);
ShowMessage('Es liegen '+intToStr(j)+' Seitenumbrüche vor');
end;
How many pageBreaks in memo ?
Re: How many pageBreaks in memo ?
I think I have found a solution:
procedure TForm1.btnTest1Click(Sender: TObject);
var i,j: Integer;
begin
j:= 0;
for i:= 0 to memo.ItemCount-1 do
if memo.PageBreaksBeforeItems then inc(j);
if j>0 then ShowMessage('Es liegen '+intToStr(j)+' Seitenumbrüche vor');
end;
procedure TForm1.btnTest1Click(Sender: TObject);
var i,j: Integer;
begin
j:= 0;
for i:= 0 to memo.ItemCount-1 do
if memo.PageBreaksBeforeItems then inc(j);
if j>0 then ShowMessage('Es liegen '+intToStr(j)+' Seitenumbrüche vor');
end;
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: