Hello,
I have a form where I have a statusbar with 3 panels.
1º) Page
2º) Line
3º) Column
How to get the information from my DBSRichViewEdit so that I can display them each one in the correct panel from my statusBar?
Thanls
Alex
Page, Line and Column of my text, how to get them?
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can find it in the ActionTest demo:
Code: Select all
{------------------------------ Status bar ------------------------------------}
// Displaying the index of the edited page (OnCurrentPageChange & OnPageCountChanged)
procedure TForm3.SRichViewEdit1CurrentPageChange(Sender: TObject);
begin
stat1.Panels.Items[1].Text := Format(SRVA_GetS(srvam_PageMofN),
[SRichViewEdit1.CurrentPage, SRichViewEdit1.PageCount]);
end;
// Displaying the index of the visible page
procedure TForm3.SRichViewEdit1PageScrolled(Sender: TObject);
begin
stat1.Panels.Items[0].Text := Format(SRVA_GetS(srvam_ViewPageX),
[SRichViewEdit1.ScrolledPage]);
end;
// Displaying the current line and column
procedure TForm3.SRichViewEdit1CaretMove(Sender: TObject);
var Line, Column : Integer;
begin
SRichViewEdit1.GetCurrentLineCol(Line, Column);
stat1.Panels.Items[2].Text := Format(SRVA_GetS(srvam_LineX), [Line]);
stat1.Panels.Items[3].Text := Format(SRVA_GetS(srvam_ColX), [Column]);
end;
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm