J_I
(Jordan Issa)
September 24, 2019, 10:20am
1
Hi there,
I’ve tried changing the background colour of a EpiCurrencyConver control using the BackColor property to no avail.
I’ve also tried going via the Appearance property, which doesn’t seem to exist for this control.
Does anyone have any ideas on where to go for this?
prakash
(JPN)
September 24, 2019, 10:31am
2
did you try control properties appstyling = false ?
J_I
(Jordan Issa)
September 24, 2019, 10:35am
4
Yes I tried this.
It didn’t achieve anything…
prakash
(JPN)
September 24, 2019, 11:18am
5
try rule wizard. if the control value(epi binded column) is not equal to 0, set yellow /green ?
J_I
(Jordan Issa)
September 24, 2019, 11:21am
6
Hi thanks for your help. I ended up figuring this out.
See solution below.
J_I
(Jordan Issa)
September 24, 2019, 11:26am
7
I ended up having to loop through all EpiCurrencyEditors that were bound to the EpiCurrencyConver control. This allowed me to set the color of the text box.
Horrible to look at, but it works!
See Code
foreach (Control ctrl in unitPriceCurrencyBox.Controls)
{
((EpiCurrencyEditor)ctrl).UseAppStyling = false;
if (unitCost > 0)
{
((EpiCurrencyEditor)ctrl).Appearance.BackColor = Color.Green;
((EpiCurrencyEditor)ctrl).Appearance.BackColor2 = Color.Green;
}
else
{
((EpiCurrencyEditor)ctrl).Appearance.BackColor = Color.Green;
((EpiCurrencyEditor)ctrl).Appearance.BackColor2 = Color.Green;
}
}
3 Likes