|
-
November 15th, 2009, 12:21 PM
#2
Re: How to change button color using tag or name property
---EDIT----
You never assign anything to your .Tag property :P
I cant see why it wouldn't work except that in your web application you are looking for controls in panel1, whilst in your forms app you refer to this.Controls. Is "this" refering to the form or panel1 ?
I did a simple test
Code:
private void button1_Click(object sender, EventArgs e)
{
button1.BackColor = Color.Yellow;
}
That changes the color of the button without any problems. Can you place a breakpoint in your code where it is supposed to change the color and see that it is actually being executed?
Last edited by ixilom; November 15th, 2009 at 12:24 PM.
Reason: Noticed something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|