1. When I start the richview font is Arial and font size is 10. How can I set the starting font and font size when opening the form that contains the dbrichview?
2. How can I find the current position of the cursor. I want to display it in the status bar. Iw ant line number and column position.
Thanks
Starting Font and Font size, also show position of cursor
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1) Assuming that you use TDBRichViewEdit in mode what allows adding styles, you can use TDBRichViewEdit.OnNewDocument to create a default set of styles:
Code: Select all
// assuming that DBRichViewEdit1.Style = RVStyle1
procedure TForm1.DBRichViewEdit1NewDocument(Sender: TObject);
begin
RVStyle1.TextStyles.Clear;
with RVStyle1.TextStyles.Add do begin
FontName := 'Times New Roman';
Size := 12;
end;
RVStyle.ParaStyles.Clear;
RVStyle.ParaStyles.Add;
RVStyle.ListStyles.Clear;
end;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: