Reputation: 6259
When I set a panel of a form invisible in the constructor, I cannot set it to visible after. I set Visible = true, but it will not be shown. Does somebody seen the same problem and can give me a tip, how to solve this or whats the reason for this?
Upvotes: 0
Views: 323
Reputation: 6259
I have found the Problem: There was a Eventhandler which was bound to the Visible_Changed-Event and make the problem.
Upvotes: 0
Reputation: 661
I try to create a Form with a Panel, and set it to invisible in the constructor
public Form1()
{
InitializeComponent();
panel1.Visible = false;
}
and a button which shows that Panel after it:
private void button1_Click(object sender, EventArgs e)
{
panel1.Visible = true;
}
and evertything works.
Maybe place your code here, so I or someone else could help.
Upvotes: 1