Forum Discussion
Pre requiste conditions:
1. Above method and Rename it has Function TextBox()
2. Invoke GetBackgroundColor () in Function TextBox()
Below is the source code snippet for finding the background color of the button/Text etc...
At present the below method checks whether the color is "Green" Or not.? Simillary we can implement the same logic for the other colors like "Orange","Blue" etc...in that case we need to use Switch(Color) case:
//=============================================================================================================================================
/* Function: GetBackgroundColor
Desc: Gets the background color for the control.
Input: None
Return: biSColorChanged
Status: final
Date: 17 Jan 2013
//=============================================================================================================================================*/
function GetBackgroundColor()
{
biSColorChanged = false;
var ULColor = ULEditBoxObj1.BackColor;
var ULRed = ULColor.get_R(); // R-->0
var ULGreen = ULColor.get_G();//G-->204
var ULBlue = ULColor.get_B();//B-->0 ; HEX-> #00CC00
var ULRGBValue1 = aqString.Concat(ULRed,ULGreen);
var ULRGBValue2 = aqString.Concat(ULRGBValue1,ULBlue);
if(ULRGBValue2 == Project.Variables.RGB)
{
Log.Message("Underlying Textbox Background color is changed to Green:");
biSColorChanged = true;
}
else
{
Log.Warning("Underlying Textbox Background color is NOT changed to Green:")
biSColorChanged;
}
return biSColorChanged;
}
Regards,
Kumar
Related Content
- 5 years ago
- 9 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago