Forum Discussion

kumar_perlaa's avatar
kumar_perlaa
Contributor
13 years ago

How to find background colour of Text Box of Edit Control ?

Alex/Tanya,

Kindly suggest a sol for above query?



Below is the scenario( Refer comment lines please)




  1. Enter the value in Text box.


  2. Text box Background colour is changing  into Green colour.


Code Snippet

function GetBackGroundColour()

{

  var ULEditBoxObj    = getBackgroundColour();// Object reference

  var ULEditBoxObj1   = ULEditBoxObj.WinFormsObject("TextBoxMaskBox", "");// Text box(TB) Object Reference.

 

  var ULValue         = ULEditBoxObj1.wText;  // Existing value from TB($87.76)

  Log.Message("Existing U/L value-->:" + ULValue);

  var ULValue         = aqConvert.StrToInt(ULValue);

  var ULValue         = ULValue + 1;

  Log.Message("U/L New Value-->:" +ULValue);

  ULEditBoxObj1.SetText(ULValue);// Text box background colour changing to Green colour.... and Apply button is enabling on the window.

 

}

Questions:

What is the method I need to call to handle background colour ? Is it get_BackColor() , get_BackColorBrush() or some other methods, Please let me know?