[Urgente]Secure table in the text
[Urgente]Secure table in the text
Need instruction or command or property table fixing it in the text of the Richview fixing the same in a row and column that I want.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If solutions proposed in http://www.trichview.com/forums/viewtopic.php?t=6050 are not acceptable, please explain why.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TRichView itself does not support floating objects at fixed positions, so you need to prepare two documents: a main document and a document with a table.
The main document can be printed using TRVPrint, as usual, a table can be printed using TRVReportHelper component in TRVPrint.OnPagePostpaint event. I'll make an example later today or tomorrow.
The main document can be printed using TRVPrint, as usual, a table can be printed using TRVReportHelper component in TRVPrint.OnPagePostpaint event. I'll make an example later today or tomorrow.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I adapted one of old demos for printing headers.
Now it prints a table (more exactly, any document prepared in a separate editor) below the text of the main document at the fixed position (X = 1 cm, Y= 5 cm) (actually, for more precise positioning in cm, printer physical margins must be taken into account; if you want, I can explain how to do it)
http://www.trichview.com/support/files/ ... dtable.zip
PS: I found un unexpected behavior - when RVReportHelper is used for drawing on page for the first time, the main form may become active. I'll try to investigate why it happens, but a workaround is simple - initializing TRVReportHelper before showing a preview form, for example in FormCreate:
Now it prints a table (more exactly, any document prepared in a separate editor) below the text of the main document at the fixed position (X = 1 cm, Y= 5 cm) (actually, for more precise positioning in cm, printer physical margins must be taken into account; if you want, I can explain how to do it)
http://www.trichview.com/support/files/ ... dtable.zip
PS: I found un unexpected behavior - when RVReportHelper is used for drawing on page for the first time, the main form may become active. I'll try to investigate why it happens, but a workaround is simple - initializing TRVReportHelper before showing a preview form, for example in FormCreate:
Code: Select all
rvhHeader.Init(Canvas, 100);
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I'm putting as follows:
on the event onpaintpage.
Code: Select all
Canvas.Brush.Style := bsClear;
Canvas.Font.Assign(SRichViewEdit1.RichViewEdit.Style.TextStyles[7]);
// Drawing header
H := SRichViewEdit1.TopMargin100Pix;
Text := 'TRASLADO';
Canvas.FillRect(Rect(294, 20, 1088, 20 + H));
Canvas.TextOut( (900 + 1088 - Canvas.TextWidth(Text)) div 2, PageRect.Top + H div 2, Text);
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hmm. Do you use ScaleRichView?
I thought you use TRVPrint, so my solution with the fixed table is for TRVPrint, not for TSRichViewEdit.
For TSRichViewEdit, you can use a similar method in OnPaintPage event, but WYSIWYG output is not guaranteed.
As for the header. Why do you draw it using events? You can add text to SRichViewEdit1.RVHeader instead.
I thought you use TRVPrint, so my solution with the fixed table is for TRVPrint, not for TSRichViewEdit.
For TSRichViewEdit, you can use a similar method in OnPaintPage event, but WYSIWYG output is not guaranteed.
As for the header. Why do you draw it using events? You can add text to SRichViewEdit1.RVHeader instead.
yes, I used the following code:
but was not able to format the letter and put right, so I found this code made earlier quoted, but that is also not working properly, could you tell me how to do?
Code: Select all
SRichViewEdit1.RVHeader.InsertText ('TRASLADO');
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: