Dynamic text alignment on a memo in Script
Lorenz
London
Hi
I't trying to do dynamic text alignment on a memo from the OnAfterData event.
I have got the style changing but cannot get the alignement working
Please does anyone know how ?
Keywords
Script Dynamic Memo Align Frame Haleft HaCenter HAlign
Any Help much appreaciated. [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Lorenz[/img]
I't trying to do dynamic text alignment on a memo from the OnAfterData event.
I have got the style changing but cannot get the alignement working
Please does anyone know how ?
procedure Memo3OnAfterData(Sender: TfrxComponent);
var
aFormat:string;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
begin
aFormat:=copy(memo3.value,1,2);Â Â Â Â Â Â Â Â Â Â
memo3.text:=copy(memo3.value,3,42);//+'-'+aFormat;Â Â Â Â
if Aformat='06' then memo3.font.style:=fsbold else  memo3.font.style:=0;
{ here is the values
frConsts['fsBold'] := 2;
frConsts['fsItalic'] := 1;
frConsts['fsUnderline'] := 4;
frConsts['fsStrikeOut'] := 8;}Â Â Â Â Â Â
   Â
// ****************Â Â This Does not appear to work ? ****************
 Â
// if Aformat='05' then memo3.frame.HAlign:=haCenter else memo3.frame.HAlign:=haLeft;
 Â
// ****************Â Â This Does not appear to work ? ****************Â Â Â Â
 Â
   Â
end;
Keywords
Script Dynamic Memo Align Frame Haleft HaCenter HAlign
Any Help much appreaciated. [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Lorenz[/img]
Comments
if Aformat='05' then memo3.HAlign:=haCenter else memo3.HAlign:=haLeft;