EpiCurrencyConver change background colour

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?

did you try control properties appstyling = false ?

Yes I tried this.

It didn’t achieve anything…

try rule wizard. if the control value(epi binded column) is not equal to 0, set yellow /green ?

Hi thanks for your help. I ended up figuring this out.

See solution below.

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