>>>Hi All:
>>>
>>>A while ago, Tamar Granor helped me with writing a report using the following listener:
>>>
>>>
>>>loListener = NEWOBJECT("EffectsListener",HOME(2) + "\Solution\Europa\DynamicFormatting.prg")
>>>
>>>
>>>Upon further study, it seems that this program only handles the ability to dynamically change font style (bold, italics, etc) and font color. For each of these items, there is a method in the above program. Following are short snippets of each:
>>>
>>>
>>>define class DynamicForeColorEffect as UserEffectHandler
>>> cEffectName = 'FORECOLOR'
>>>
>>>* Evaluate the expression. If the result is a numeric value and doesn't match
>>>* the existing color of the object, change the object's color and set the
>>>* Reload flag to .T.
>>>
>>> function Execute(toObjProperties, tcExpression)
>>> local lnColor, ;
>>> lnPenRed, ;
>>> lnPenGreen, ;
>>> lnPenBlue
>>> lnColor = This.EvaluateExpression(tcExpression)
>>>
>>>
>>>
>>>define class DynamicStyleEffect as UserEffectHandler
>>> cEffectName = 'STYLE'
>>>
>>>* Evaluate the expression. If the result is a numeric value and doesn't match
>>>* the existing style of the object, change the object's style and set the
>>>* Reload flag to .T.
>>>
>>> function Execute(toObjProperties, tcExpression)
>>> local lnStyle
>>> lnStyle = This.EvaluateExpression(tcExpression)
>>>
>>>
>>>I need a method to dymnamically change FONT SIZE and the FONT NAME.
>>>
>>>How do I accomplish that?
>>>
>>
>>Take look at
www.report-sculptor.com>>You create report using forms and form objects. You build report bands (visually) as form containers and then drive whole
>>report directly from your code. You already know how to manipulate form objects at run time, therefore everything in your report (be that entire columns, fonts, colors, sizes, pictures, etc) is dynamic.
>>
>>HTH
>>Sergio
>
>Thanks, Sergio; I will look at it.
Hi Yossi
here is a sample how to change font & size dynamically
http://blog.donnael.com/2004/06/vfp9-report-sample/oObjProperties.FontSize = 12
as said by Doug Hennig
>>You have to size the field large enough to display the largest text.
still applicable