How to change the backcolor of a text box?

I am having a similar problem where I'd like to change the status type to reflect a certain color when a grid is updating during runtime. My problem is that the style won't change to StatusTypes.Stop before the grid is updated so that the shape will be red while updating, then go back to StatusTypes.OK when it's finished.

statusShape.Status = StatusTypes.Stop;
updateGridWithBinParts1();
statusShape.Status = StatusTypes.OK;

Am I missing something?


--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Use the Shape.ShapeStatus in EpiShape to change the color between "Error",
> "OK", "Warning" etc look through the forum for examples I don't have any
> handy.
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Tue, May 14, 2013 at 1:03 PM, noor.fazli@...
> <noor.fazli@...>wrote:
>
> > **
> >
> >
> >
> > I noticed one strange thing is that after running the code although the
> > Backcolor of the epishape does not seem to be changed but when I went in
> > Customization mode and looked at the properties of the object , backColor
> > property showed the changed color(backcolor from the code).
> >
> > I wonder is there a better way of showing different backcolor in runtime.
> >
> > --- In vantage@yahoogroups.com, "noor.fazli@" <noor.fazli@> wrote:
> > >
> > > Hi,
> > > we have to display the current status of the quote. For that I have used
> > a user defined field and linked it to a text box.
> > > Based on the values from 4 different fields from Quotedtl table it could
> > fall into either 1 of the state. I am able to display the text of the state
> > inot this user defined field but I need to change the backcolor of the text
> > box based on the current state.
> > > I have tried the following code but the backcolor property is not
> > changing. Please help.Also UseAppStyling property of control is set to
> > false.
> > >
> > >
> > > private static void QuoteDtl_AfterFieldChange(object sender,
> > DataColumnChangeEventArgs args)
> > > {
> > > // ** Argument Properties and Uses **
> > > // args.Row["FieldName"]
> > > // args.Column, args.ProposedValue, args.Row
> > > // Add Event Handler Code
> > > Epicor.Mfg.UI.FrameWork.EpiTextBox confidence =
> > ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> > > Epicor.Mfg.UI.FrameWork.EpiTextBox Status =
> > ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
> > >
> > > switch (args.Column.ColumnName)
> > > {
> > > case "BestCsPct":
> > >
> > > if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> > > EpiMessageBox.Show(args.ProposedValue.ToString());
> > > args.Row.BeginEdit();
> > > args.Row["ShortChar02"] = "Forecasting";
> > > Status.Enabled = true;
> > > Status.Value = "Forecast";
> > > args.Row.EndEdit();
> > > Status.UseAppStyling = false;
> > > Status.Appearance.BackColor = System.Drawing.Color.Lime;
> > >
> > > Status.Enabled = false;
> > >
> > > // Status.BackColor = Color.Red;
> > > }
> > >
> > > break;
> > > }
> > > }
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Hi,
we have to display the current status of the quote. For that I have used a user defined field and linked it to a text box.
Based on the values from 4 different fields from Quotedtl table it could fall into either 1 of the state. I am able to display the text of the state inot this user defined field but I need to change the backcolor of the text box based on the current state.
I have tried the following code but the backcolor property is not changing. Please help.Also UseAppStyling property of control is set to false.


private static void QuoteDtl_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
{
// ** Argument Properties and Uses **
// args.Row["FieldName"]
// args.Column, args.ProposedValue, args.Row
// Add Event Handler Code
Epicor.Mfg.UI.FrameWork.EpiTextBox confidence = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
Epicor.Mfg.UI.FrameWork.EpiTextBox Status = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));

switch (args.Column.ColumnName)
{
case "BestCsPct":

if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
EpiMessageBox.Show(args.ProposedValue.ToString());
args.Row.BeginEdit();
args.Row["ShortChar02"] = "Forecasting";
Status.Enabled = true;
Status.Value = "Forecast";
args.Row.EndEdit();
Status.UseAppStyling = false;
Status.Appearance.BackColor = System.Drawing.Color.Lime;

Status.Enabled = false;

// Status.BackColor = Color.Red;
}

break;
}
}
Folks any idea?

--- In vantage@yahoogroups.com, "noor.fazli@..." <noor.fazli@...> wrote:
>
> Hi,
> we have to display the current status of the quote. For that I have used a user defined field and linked it to a text box.
> Based on the values from 4 different fields from Quotedtl table it could fall into either 1 of the state. I am able to display the text of the state inot this user defined field but I need to change the backcolor of the text box based on the current state.
> I have tried the following code but the backcolor property is not changing. Please help.Also UseAppStyling property of control is set to false.
>
>
> private static void QuoteDtl_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
> {
> // ** Argument Properties and Uses **
> // args.Row["FieldName"]
> // args.Column, args.ProposedValue, args.Row
> // Add Event Handler Code
> Epicor.Mfg.UI.FrameWork.EpiTextBox confidence = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> Epicor.Mfg.UI.FrameWork.EpiTextBox Status = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
>
> switch (args.Column.ColumnName)
> {
> case "BestCsPct":
>
> if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> EpiMessageBox.Show(args.ProposedValue.ToString());
> args.Row.BeginEdit();
> args.Row["ShortChar02"] = "Forecasting";
> Status.Enabled = true;
> Status.Value = "Forecast";
> args.Row.EndEdit();
> Status.UseAppStyling = false;
> Status.Appearance.BackColor = System.Drawing.Color.Lime;
>
> Status.Enabled = false;
>
> // Status.BackColor = Color.Red;
> }
>
> break;
> }
> }
>
Usually a pain use a epishape
On May 14, 2013 7:48 AM, "noor.fazli@..." <noor.fazli@...>
wrote:

> **
>
>
> Folks any idea?
>
> --- In vantage@yahoogroups.com, "noor.fazli@..." <noor.fazli@...> wrote:
> >
> > Hi,
> > we have to display the current status of the quote. For that I have used
> a user defined field and linked it to a text box.
> > Based on the values from 4 different fields from Quotedtl table it could
> fall into either 1 of the state. I am able to display the text of the state
> inot this user defined field but I need to change the backcolor of the text
> box based on the current state.
> > I have tried the following code but the backcolor property is not
> changing. Please help.Also UseAppStyling property of control is set to
> false.
> >
> >
> > private static void QuoteDtl_AfterFieldChange(object sender,
> DataColumnChangeEventArgs args)
> > {
> > // ** Argument Properties and Uses **
> > // args.Row["FieldName"]
> > // args.Column, args.ProposedValue, args.Row
> > // Add Event Handler Code
> > Epicor.Mfg.UI.FrameWork.EpiTextBox confidence =
> ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> > Epicor.Mfg.UI.FrameWork.EpiTextBox Status =
> ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
> >
> > switch (args.Column.ColumnName)
> > {
> > case "BestCsPct":
> >
> > if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> > EpiMessageBox.Show(args.ProposedValue.ToString());
> > args.Row.BeginEdit();
> > args.Row["ShortChar02"] = "Forecasting";
> > Status.Enabled = true;
> > Status.Value = "Forecast";
> > args.Row.EndEdit();
> > Status.UseAppStyling = false;
> > Status.Appearance.BackColor = System.Drawing.Color.Lime;
> >
> > Status.Enabled = false;
> >
> > // Status.BackColor = Color.Red;
> > }
> >
> > break;
> > }
> > }
> >
>
>
>


[Non-text portions of this message have been removed]
Jose I tried 4 epishapes(thinking to hide 3 and displaying just one with the right text) and set the different colors for all 4 but when the data is loaded they all seem to be the same color, which is green.

Any help will be apprecaited.


thanks


--- In vantage@yahoogroups.com, "noor.fazli@..." <noor.fazli@...> wrote:
>
> Hi,
> we have to display the current status of the quote. For that I have used a user defined field and linked it to a text box.
> Based on the values from 4 different fields from Quotedtl table it could fall into either 1 of the state. I am able to display the text of the state inot this user defined field but I need to change the backcolor of the text box based on the current state.
> I have tried the following code but the backcolor property is not changing. Please help.Also UseAppStyling property of control is set to false.
>
>
> private static void QuoteDtl_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
> {
> // ** Argument Properties and Uses **
> // args.Row["FieldName"]
> // args.Column, args.ProposedValue, args.Row
> // Add Event Handler Code
> Epicor.Mfg.UI.FrameWork.EpiTextBox confidence = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> Epicor.Mfg.UI.FrameWork.EpiTextBox Status = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
>
> switch (args.Column.ColumnName)
> {
> case "BestCsPct":
>
> if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> EpiMessageBox.Show(args.ProposedValue.ToString());
> args.Row.BeginEdit();
> args.Row["ShortChar02"] = "Forecasting";
> Status.Enabled = true;
> Status.Value = "Forecast";
> args.Row.EndEdit();
> Status.UseAppStyling = false;
> Status.Appearance.BackColor = System.Drawing.Color.Lime;
>
> Status.Enabled = false;
>
> // Status.BackColor = Color.Red;
> }
>
> break;
> }
> }
>
Jose I tried 4 epishapes(thinking to hide 3 and displaying just one with the right text) and set the different colors for all 4 but when the data is loaded they all seem to be the same color, which is green.

Any help will be apprecaited.


thanks


--- In vantage@yahoogroups.com, "noor.fazli@..." <noor.fazli@...> wrote:
>
> Hi,
> we have to display the current status of the quote. For that I have used a user defined field and linked it to a text box.
> Based on the values from 4 different fields from Quotedtl table it could fall into either 1 of the state. I am able to display the text of the state inot this user defined field but I need to change the backcolor of the text box based on the current state.
> I have tried the following code but the backcolor property is not changing. Please help.Also UseAppStyling property of control is set to false.
>
>
> private static void QuoteDtl_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
> {
> // ** Argument Properties and Uses **
> // args.Row["FieldName"]
> // args.Column, args.ProposedValue, args.Row
> // Add Event Handler Code
> Epicor.Mfg.UI.FrameWork.EpiTextBox confidence = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> Epicor.Mfg.UI.FrameWork.EpiTextBox Status = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
>
> switch (args.Column.ColumnName)
> {
> case "BestCsPct":
>
> if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> EpiMessageBox.Show(args.ProposedValue.ToString());
> args.Row.BeginEdit();
> args.Row["ShortChar02"] = "Forecasting";
> Status.Enabled = true;
> Status.Value = "Forecast";
> args.Row.EndEdit();
> Status.UseAppStyling = false;
> Status.Appearance.BackColor = System.Drawing.Color.Lime;
>
> Status.Enabled = false;
>
> // Status.BackColor = Color.Red;
> }
>
> break;
> }
> }
>
I noticed one strange thing is that after running the code although the Backcolor of the epishape does not seem to be changed but when I went in Customization mode and looked at the properties of the object , backColor property showed the changed color(backcolor from the code).

I wonder is there a better way of showing different backcolor in runtime.
--- In vantage@yahoogroups.com, "noor.fazli@..." <noor.fazli@...> wrote:
>
> Hi,
> we have to display the current status of the quote. For that I have used a user defined field and linked it to a text box.
> Based on the values from 4 different fields from Quotedtl table it could fall into either 1 of the state. I am able to display the text of the state inot this user defined field but I need to change the backcolor of the text box based on the current state.
> I have tried the following code but the backcolor property is not changing. Please help.Also UseAppStyling property of control is set to false.
>
>
> private static void QuoteDtl_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
> {
> // ** Argument Properties and Uses **
> // args.Row["FieldName"]
> // args.Column, args.ProposedValue, args.Row
> // Add Event Handler Code
> Epicor.Mfg.UI.FrameWork.EpiTextBox confidence = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> Epicor.Mfg.UI.FrameWork.EpiTextBox Status = ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
>
> switch (args.Column.ColumnName)
> {
> case "BestCsPct":
>
> if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> EpiMessageBox.Show(args.ProposedValue.ToString());
> args.Row.BeginEdit();
> args.Row["ShortChar02"] = "Forecasting";
> Status.Enabled = true;
> Status.Value = "Forecast";
> args.Row.EndEdit();
> Status.UseAppStyling = false;
> Status.Appearance.BackColor = System.Drawing.Color.Lime;
>
> Status.Enabled = false;
>
> // Status.BackColor = Color.Red;
> }
>
> break;
> }
> }
>
Use the Shape.ShapeStatus in EpiShape to change the color between "Error",
"OK", "Warning" etc look through the forum for examples I don't have any
handy.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, May 14, 2013 at 1:03 PM, noor.fazli@...
<noor.fazli@...>wrote:

> **
>
>
>
> I noticed one strange thing is that after running the code although the
> Backcolor of the epishape does not seem to be changed but when I went in
> Customization mode and looked at the properties of the object , backColor
> property showed the changed color(backcolor from the code).
>
> I wonder is there a better way of showing different backcolor in runtime.
>
> --- In vantage@yahoogroups.com, "noor.fazli@..." <noor.fazli@...> wrote:
> >
> > Hi,
> > we have to display the current status of the quote. For that I have used
> a user defined field and linked it to a text box.
> > Based on the values from 4 different fields from Quotedtl table it could
> fall into either 1 of the state. I am able to display the text of the state
> inot this user defined field but I need to change the backcolor of the text
> box based on the current state.
> > I have tried the following code but the backcolor property is not
> changing. Please help.Also UseAppStyling property of control is set to
> false.
> >
> >
> > private static void QuoteDtl_AfterFieldChange(object sender,
> DataColumnChangeEventArgs args)
> > {
> > // ** Argument Properties and Uses **
> > // args.Row["FieldName"]
> > // args.Column, args.ProposedValue, args.Row
> > // Add Event Handler Code
> > Epicor.Mfg.UI.FrameWork.EpiTextBox confidence =
> ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["cf11d1d8-a7d1-49e0-bfe4-86b77185338f"]));
> > Epicor.Mfg.UI.FrameWork.EpiTextBox Status =
> ((Epicor.Mfg.UI.FrameWork.EpiTextBox)(Script.csm.PersonalizeCustomizeManager.ControlsHT["49f11e93-dc24-4239-aa9b-b464b9441428"]));
> >
> > switch (args.Column.ColumnName)
> > {
> > case "BestCsPct":
> >
> > if (((Int32)(args.ProposedValue) == 100) && (args.Row["POLine"] == "")){
> > EpiMessageBox.Show(args.ProposedValue.ToString());
> > args.Row.BeginEdit();
> > args.Row["ShortChar02"] = "Forecasting";
> > Status.Enabled = true;
> > Status.Value = "Forecast";
> > args.Row.EndEdit();
> > Status.UseAppStyling = false;
> > Status.Appearance.BackColor = System.Drawing.Color.Lime;
> >
> > Status.Enabled = false;
> >
> > // Status.BackColor = Color.Red;
> > }
> >
> > break;
> > }
> > }
> >
>
>
>


[Non-text portions of this message have been removed]