all groups > dotnet windows forms designtime > october 2007 >
You're in the

dotnet windows forms designtime

group:

What is the best way to restrict a drop in a designer?


What is the best way to restrict a drop in a designer? tribbles
10/3/2007 2:12:41 PM
dotnet windows forms designtime: I have a designer surface that allows several custom user controls to
be used on it. I have created a new user control which is a container
that needs to only allow a few of the possible controls choices to be
placed in it.

I've experimented with a ParentControlDesigner and found that the
various 'Can...' methods works with paste commands and moving of objects
already on the design surface, but not with an item being dropped from
the Toolbox. I've tried an OnDragEnter to disallow a drop, but again,
it has no effect on toolbox items that are dropped.

How do you get the toolbox drag to recognize that a drop is disallowed?
RE: What is the best way to restrict a drop in a designer? Richard
12/10/2007 8:08:00 PM
Did you get anything working?

[quoted text, click to view]
AddThis Social Bookmark Button