I have this problem that my panel object is drawn above an runtime created object...
It's really annoying so my question is:
Is there a way to change the order to display the objects?
If you want code just ask.
-Christopher
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
PJ MartinsRank #2,548 · 548 reputationPosted Jun 5, 2010, 3:03 PM EDT
Christopher Anonymus10 reputationPosted Jun 6, 2010, 6:42 AM EDT
Thanks for the answer.
PJ MartinsRank #2,548 · 548 reputationPosted Jun 6, 2010, 8:39 AM EDT
Christopher Anonymus10 reputationPosted Jun 11, 2010, 6:57 AM EDT
Jaish MathewsRank #225 · 11K reputationPosted Jun 11, 2010, 7:41 AM EDT
I added a button control to a Panel without any problem like below. I could able to attach an event too.
Try this way...
Button b1 = new Button();
b1.Text = "Dynamically Created";
b1.Name = "Dynamic1";
b1.Click+=new EventHandler(b1_Click);
b1.BackColor = Color.Silver;
panel1.Controls.Add(b1);
Need to set each property of the dynamic button. Otherwise it may take that specific property value from Panel i.e. from it's container.
Christopher Anonymus10 reputationPosted Jun 11, 2010, 9:06 AM EDT