No Body Has solution for this critical query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am having a custom Tab control. In the Control's designer class am adding the follwoing code but it is not working i am still able to drag and drop a button or other controls on tabControl. But it works if I drag and drop a control, say button on from, and hten cut and try to paste it on my Tab Control.
I am wondering why it doesn't work if i directly try to add a control from tool box??Ideally it should throw me an error.....
Anyone has faced this probelm.....

public class CustomTabControlDesigner : System.Windows.Forms.Design.ParentControlDesigne


public override bool CanParent(Control control)

{
return (control is CustomTabPage);
}
 
I replied to your posting in the drawing newsgroup.

Nilesh Rade said:
Hi ,
I am having a custom Tab control. In the Control's designer class am
adding the follwoing code but it is not working i am still able to drag and
drop a button or other controls on tabControl. But it works if I drag and
drop a control, say button on from, and hten cut and try to paste it on my
Tab Control.
I am wondering why it doesn't work if i directly try to add a control from
tool box??Ideally it should throw me an error......
 
Hi Andrew,
I tried OnDragOver but it will not be a soluiton because i can still add
the control noy by dragging but by just selecting it from the tool box
and drawing it on the control.
Again the control which am trying to drag is still there in the memory
and can be seen in the mouse curson which shows it.........

Do you have any other alternative????

--Nilesh
 
Back
Top