We are developing a windows based application using .NET 3.5 SP1. We have a form on which we have placed the panel control. First part of the panel displays the link of the form which needs to be opened in the right side panel. The problem is that, when the form is opened by clicking the left side panel link on to the panel, the form is displayed on the right side panel. However, the right click feature is not working on th form which is opened in the right side panel. Interesting part is that, if we open the form from the left side panel by using the right click option (pop-up). Then the right click works. Can anyone please let me know if you have ever encountered this issue? And If yes, then what is the cause and a fix for it..
we are using following code to add controls to panel
form1 f1 = new form1();
f1.topLevel=false;
f1.show=true;
panel1.controls.add(f1);
Thanks.
Loading
Vanita KorePosted Jun 8, 2010, 9:33 AM
protected void lnk_Click(Object 0, clickEventargs e)
{
form1 f1= new form1();
f1.topLevel=false;
f1.show=true;
panel1.controls.add(f1);
}
now when the form is loaded on panel then rightclick property is not working. Not even we select data in textbox. Backspace is working but mouse select and right click is not working.
Amit ChoudharyPosted Jun 8, 2010, 2:42 AM
you must add handler related to your clickevent.. associated with the form f1 before adding it to panel.
Please mark as answer if it helps.