A question was asked on the mailing list regarding the ability to change the appearance (background, foreground, color) of an input control within the Epicor ERP10 configuration.
This was an unusual request and it took a few minutes to figure it out. Below is the code which when excecuted on field change will change the appearance of the given input control to have a red background. It is worth noting that because of the way that the configurator editor is written there are parts of the configurator which do not have access to the Infragistics controls / dlls. In this case you would have to load the DLL manually using reflection which I do not cover below.
However if done at the control level (OnChange, OnLeave) the Infragistic DLL seems to be available and the code below works. Please watch the companion video if you want more details.
The Input.InputName is an object called InputControlValueBound which contains a reference to a “Control” and the value of said control. Once you’ve figured this out, you can use the public property .Control to get a hold of the EpiXXX (EpiTextBox,EpiCombo,etc..) object and then set the Appearance as you normally would.
Please note that all Epicor EpiXXX controls have a default property called “UseAppStyling” if this property is set to true the control ignores any appearance changes because it assumes you want to load the default theme from the environment. This property needs to be set to false in order to allow the appearance changes to take effect.
Put this code in your OnChange , OnLeave event
Code to implement:
Infragistics.Win.Appearance app1 = new Infragistics.Win.Appearance(); app1.BackColor =Color.Red; ((Ice.Lib.Framework.EpiTextBox)Inputs.MTPDESC.Control).UseAppStyling = false; ((Ice.Lib.Framework.EpiTextBox)Inputs.MTPDESC.Control).Appearance = app1; //Done