You can also use {M:Material Name} such as {M:Blue} to apply a material instead of making separate fonts.
This way you just have 1 white font and can switch face materials instead.
So you could have same as Roma but instead of
txt.Text = "{1}" + txt.Text '{1} - green font ID
you could have
txt.Text = "{M:Green} + text.Text
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
------------------------------
Original Message:
Sent: 08-29-2022 04:04
From: Roman Yaroshenko
Subject: Change font color in XPN 10
Hey!
Try another method.
First: Create three fonts: green, red and blue (blue if the price does not change)
Second: Set the script to "OnOnline" and "OnPreviewRender".Dim up, down As xpBaseObjectself.GetObjectByName("Up", up)self.GetObjectByName("Down", down)Dim txt As xpTextObjectself.GetObjectByName("Text1", txt)If up.Visible Then txt.Text = "{1}" + txt.Text '{1} - green font IDElseIf down.Visible Then txt.Text = "{2}" + txt.Text '{2} - red font IDElse txt.Text = "{3}" + txt.Text '{3} - nochange font IDEnd If
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 08-26-2022 14:54
From: Simon Redmile
Subject: Change font color in XPN 10
Hey,
Probably the simplest way is visual logic.
In my example based on if the quad is visible or not the material changes.


------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 08-26-2022 14:35
From: Lee Mann
Subject: Change font color in XPN 10
Hi all!
Sorry if this has been answered before also I'm new to Xpression 10.
I want my font color to change based on a particular element being visible.
Example: A gas prices graphic. When the up arrow is visible the font displaying the price would be red and when the down arrow is visible the color would be green.
Is this possible? And how would I set up the change?
------------------------------
Lee Mann
WAKA 8
------------------------------