Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / May 2005

Tip: Looking for answers? Try searching our database.

Custom Designer with Custom Control Issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Robinson - 07 Apr 2005 15:27 GMT
In my application I have a base control class - call it BaseControl - from
which I inherit to create multiple controls. I'm using a custom
ControlDesigner class because I need one or two special actions to be
available to the inherited controls at design-time.

But when I create a new control - call it MyControl - by inheriting
BaseControl, and open MyControl in the VS designer, I don't see any evidence
that my custom ControlDesigner class is being used at all; and a quick
MessageBox-in-constructor test verifies that one isn't even being created.

However, if I add BaseControl to the IDE toolbox and drag one onto a Form
without inheriting, all works fine and it uses the custom ControlDesigner,
verifying that it's implemented correctly.

Has anybody run across the same problem? I'm wondering if there's a simple
step I've overlooked that will get VS to use my custom ControlDesigner for
inherited classes; or do I need to go back to the drawing board and find a
way to do what I need to do without having to inherit BaseControl? (Or is
this a glitch? The Framework docs state plainly that all "design-time
attributes" of a Component class should be picked up by its inheritors.)
joeycalisay - 08 Apr 2005 02:30 GMT
are they all on the same assembly?

Signature

Joey Calisay
http://spaces.msn.com/members/joeycalisay/

> In my application I have a base control class - call it BaseControl - from
> which I inherit to create multiple controls. I'm using a custom
[quoted text clipped - 16 lines]
> this a glitch? The Framework docs state plainly that all "design-time
> attributes" of a Component class should be picked up by its inheritors.)
Robin Sanner - 08 Apr 2005 21:16 GMT
I had the same problem in post "Repost for Microsoft: Designer not activated
when designing Inheri", here's the response I received:

Your custom designer will not be used when your custom usercontrol is being
designed.  VS uses IRootDesigners when design view is being uses, and using
reflector I can only see FormDocumentDesigner (used by forms) and the
UserControlDocumentDesigner (used by usercontrols).

Signature

Joey Calisay
http://spaces.msn.com/members/joeycalisay/


> In my application I have a base control class - call it BaseControl - from
> which I inherit to create multiple controls. I'm using a custom
[quoted text clipped - 17 lines]
> this a glitch? The Framework docs state plainly that all "design-time
> attributes" of a Component class should be picked up by its inheritors.)
Michael Powell - 30 May 2005 16:55 GMT
I just did a test, and derived classes use my designer without any problem.
My class is derived from ContainerControl, and my designer is derived from
ParentControlDesigner

Signature

~Mike Powell,
software designer for Ramuseco ltd
www.ramuseco.com

> In my application I have a base control class - call it BaseControl - from
> which I inherit to create multiple controls. I'm using a custom
[quoted text clipped - 17 lines]
> this a glitch? The Framework docs state plainly that all "design-time
> attributes" of a Component class should be picked up by its inheritors.)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.