Fórum Rave: mudar propriedade do DataText para negrito #358232
09/05/2008
0
para mudar a cor da fonte eu uso o seguinte codigo no OnBeforePrint do componente:
self.color := clRed;
e para mudar para negrito????
valeu!
Mahdak
Curtir tópico
+ 0Posts
09/05/2008
Joaoshi
Gostei + 0
09/05/2008
Mahdak
error #22 unknown identifier [bold].
Gostei + 0
12/05/2008
Mahdak
Gostei + 0
14/05/2008
Mahdak
Dynamically Changing Fonts
--------------------------------
2) Another choice is to use the FontMaster component and a Rave event . to control which FontMaster is used. First, drop several FontMaster components on a Global Page. Set one FontMaster name to ´FontArial10NormalBlack´ with the font attributes set as ´Arial´ ´10 points´ ´Normal´ ´Black´. Then set the other FontMaster name to ´FontArial10BoldRed´ with the font attributes set as ´Arial´ ´10 points´ ´Bold´ ´Red´. The following is an example of an event that will change the FontMirror property of a DataText component to point to the FontMaster you want based upon the contents of a DataField. This could be used in an OnBeforePrint or OnGetText event of your Text or DataText component(s).
{ Event for DataTextFishName.OnGetText }
function DataTextFishName_OnGetText(Self: TRaveDataText; var Value: string);
begin
if UpperCase(BioLifeDVCategory.AsString) = ´SHARK´ then
Self.FontMirror := FontArial10BoldRed;
else
Self.FontMirror := FontArial10NormalBlack;
end if;
end OnGetText;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)