how change the text HorizontalAlignment property run time
Posted: Wed Feb 06, 2013 6:32 am
I had a columen contains value (string or number),eg:
Type Key Detail
Error Line 2:.. Error Description
Falut content ....
STATUS Added 55
STATUS Updated 10
I want to control the Details Value Text's HorizontalAlignment property depend on the Type value,such as when Type value is not STATUS Details Text HorizontalAlignment is set to "Left" ,when Type value is "STATUS" ,I need to set the Detail Text HorizontalAlignment property to "Right" ,just satisfy the rule "Number -- Right aligned".
I try to uses at the Detail event " Before Print " in mrt file (the column of Details value is in Text25),but I got errors ,Can anyone help me ,thanks.
Type Key Detail
Error Line 2:.. Error Description
Falut content ....
STATUS Added 55
STATUS Updated 10
I want to control the Details Value Text's HorizontalAlignment property depend on the Type value,such as when Type value is not STATUS Details Text HorizontalAlignment is set to "Left" ,when Type value is "STATUS" ,I need to set the Detail Text HorizontalAlignment property to "Right" ,just satisfy the rule "Number -- Right aligned".
I try to uses
Code: Select all
Text25.HorizontalAlignment = IIF(AuditEventDetails.Type == "STATUS","Right","Left")