Rave: mudar propriedade do DataText para negrito
olá, estou tentando usar o event editor do rave para mudar a propriedade style de um determinado DataText para negrito (bold)...
para mudar a cor da fonte eu uso o seguinte codigo no OnBeforePrint do componente:
e para mudar para negrito????
valeu!
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
Curtidas 0
Respostas
Joaoshi
09/05/2008
Colega, não é só colocar [b:5d94b5e9e0]Bold := true[/b:5d94b5e9e0] ?
GOSTEI 0
Mahdak
09/05/2008
nao deu certo... ja tinha tentado...
error #22 unknown identifier [bold].
error #22 unknown identifier [bold].
GOSTEI 0
Mahdak
09/05/2008
sobe por que nao consegui resolver ainda :lol:
GOSTEI 0
Mahdak
09/05/2008
resolvido... na ajuda do rave digite bold que ira aparecer o seguinte topico:
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).
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