|
| Hi Guys,
I am developing a system using WinCE on Intel PXA255 processor.
On a particular screen, I want to change a button color when I click the button.
So the code is -
private void btnOpt1_Click(object sender, System.EventArgs e)
{
this.btnOpt1.Backcolor = Color.Red ;
// Other code follows here
}
When I run this code in Windows XP, it runs perfectly well. The button turns RED. However when I port the exact same code on WinCE, it doesn't work! Nothing crashes but the button doesn't change its color.
Interestingly this is happening only with the buttons. In the beginning I thought WinCE doesn't allow to change the environment color at the run time so I tried changing the color of a form when a particular event is generated and it works!
Any thoughts?
Thanks for the help. | |
| |
H/PC Elder Posts: | 1,712 |
Location: | New Mexico, US | Status: | |
| Maybe you send an invalidate to the Cbutton and see if it can force a redraw or something? hmmm
Or you can override the OnBackGround Erase for Controls, filter for CButton (assuming you are using CButton class) and do a CFill or something ... ? | |
|
Seconds to generate: 0.125 - Cached queries : 59 - Executed queries : 9
| | |
|