HighTechTalks DotNet Forums  

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

Dotnet Framework (WinForms DesignTime) microsoft.public.dotnet.framework.windowsforms.designtime


Discuss What is the best way to restrict a drop in a designer? in the Dotnet Framework (WinForms DesignTime) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
tribbles
 
Posts: n/a

Default What is the best way to restrict a drop in a designer? - 10-03-2007 , 05:12 PM






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?


Reply With Quote
  #2  
Old   
Richard
 
Posts: n/a

Default RE: What is the best way to restrict a drop in a designer? - 12-10-2007 , 11:08 PM






Did you get anything working?

"tribbles" wrote:

Quote:
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?



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.