[Urgente]Secure table in the text
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
There are two ways to apply this formatting to the header:
1) Apply "courier + right alignment" to 'header' style template, so text will be courier + right aligned by default.
2) Leave 'header' style template as it is, but apply "courier + right alignment" to text on top of a style template.
Which one do you prefer?
1) Apply "courier + right alignment" to 'header' style template, so text will be courier + right aligned by default.
2) Leave 'header' style template as it is, but apply "courier + right alignment" to text on top of a style template.
Which one do you prefer?
I have many questions yet. kkk
The function FillFields transforms tags (for example {Name}) I include by the event onPaintPage? If yes, how do?
For now I have only:
and the tests did not replace.
The function FillFields transforms tags (for example {Name}) I include by the event onPaintPage? If yes, how do?
For now I have only:
Code: Select all
FillFields (SRichViewEdit1.RichViewEdit.RVData) / / / body text
SRichViewEdit1.RichViewEdit.Format;
FillFields (SRichViewEdit1.RVHeader.RVData) / / / Header
SRichViewEdit1.RVHeader.Format;
FillFields (SRichViewEdit1.RVFooter.RVData) / / / footer
SRichViewEdit1.RVFooter.Format;
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If you use RichViewActions (TrvActionNew for creating a new document), changing the default header font is very simple.
rvActionNew1.StyleTemplate contains a list of styletemplates that will be applied to new documents.
A styletemplate named 'header' is included there by default. You can change its properties
rvActionNew1.StyleTemplate contains a list of styletemplates that will be applied to new documents.
A styletemplate named 'header' is included there by default. You can change its properties
Code: Select all
st := rvActionNew1.FindItemByName('header');
st.TextStyle.FontName := 'Courier New';
st.ValidTextProperties :=st.ValidTextProperties+[rvfiFontName];
st.ParaStyle.Alignment := rvaRight;
st.ValidParaProperties :=st.ValidParaProperties+[rvpiAlignment];
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Your code must work, but I would write:
Code: Select all
FillFields (SRichViewEdit1.RichViewEdit.RVData) / / / body text
FillFields (SRichViewEdit1.RVHeader.RVData) / / / Header
FillFields (SRichViewEdit1.RVFooter.RVData) / / / footer
SRichViewEdit1.Format;
this is my code in the event OnPaintPage
and in the function FillFields it is:
but not finding the word TRASLADO to replace.
What do am I doing wrong?
Code: Select all
Canvas.Brush.Style := bsClear;
Canvas.Font.Style := [fsBold]; // negrito
Canvas.Font.Size := 20; // tamanho fonte 20
Canvas.Font.Name := 'Arial'; // letra
// Drawing header
H := SRichViewEdit1.TopMargin100Pix;
Text := '{TRASLADO}';
Canvas.FillRect(Rect(PageRect.Left, PageRect.Top, PageRect.Right, PageRect.Top + H));
Canvas.TextOut((PageRect.Left + 600 +PageRect.Right - Canvas.TextWidth(Text)) div 2, PageRect.Top - 30 + H div 2, Text);
Code: Select all
if FieldName='TRASLADO' then
begin
result := '*****';
end;
What do am I doing wrong?
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: