Ident Bullet and Numbering
Posted: Sat Mar 22, 2008 1:43 pm
Hi,
I try to ident Bullet and Numbering, I see it's not posible direct with TSclRVRuler.
I set TSclRVRuler at OnRulerItemRelease event to do this:
I set ItemCurr in the TSRichEviewEdit.OnCaretMove event to get the curent Item (where it's carret)
Code work ok if I put the bullet at the first line, end the next, but if at the first line a put the text the application give error "List Index Out of Bounds"
Have you some solutions for this problem.
Tanks.
I try to ident Bullet and Numbering, I see it's not posible direct with TSclRVRuler.
I set TSclRVRuler at OnRulerItemRelease event to do this:
Code: Select all
procedure TfrmMainChild.SclRVRuler1RulerItemRelease(Sender: TObject);
begin
if srvEditor.RichViewEdit.GetItemStyle(ItemCurr-1) = rvsListMarker then begin
if srvEditor.RichViewEdit.Style.ListStyles[ItemCurr-1].Levels.Count>=0 then begin
srvEditor.RichViewEdit.Style.ListStyles[ItemCurr-1].Levels[0].MarkerIndent:=Trunc(SclRVRuler1.FirstIndent) ;
srvEditor.RichViewEdit.GetRootEditor.Reformat ;
end ;
end ;
end ;
Code: Select all
procedure TfrmMainChild.srvEditorCaretMove(Sender: TObject);
begin
ItemCurr:=srvEditor.RichViewEdit.GetItemNo(srvEditor.RichViewEdit.GetCurrentItem) ;
end;
Have you some solutions for this problem.
Tanks.