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 / WinForm Controls / January 2006

Tip: Looking for answers? Try searching our database.

Making a control editable at design time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cab0san - 01 Jan 2006 03:54 GMT
I would like to make a my own control that can be added to other
projects and used by other developers. When the developer is using the
control at design time, I would like for him to use a "wizard" style
program that would make the property settings for him, rather than
using the propertygrid editor that is normally used to make property
settings. I know that I can set the Editor atttribute on a particular
property, and call my own custom code which inherits the UITypeEditor,
but I would rather have a more integrated approach. I would like for
the wizard to be embedded in the design surface, rather than some type
of modal window. Perhaps it could slide in and out in the same way the
toolbox tab does.

1.) For example, at design time, if you use the ToolStripContainer,
there is a small arrow you can click on that displays a fly out panel
with some check boxes on it. It is just a fancy way of setting
properties that you could otherwise set in the propertygrid, but it is
more intuitive, and is a handy way to give clues to the developer on
which properties to set. The checkboxes are "editable at desgn time".

2.) Another, perhaps more simple example would be to allow a developer,
at design time, to type into a text box that is on the design surface.
This would be an easy way to set the text property of the text box (or
even the name property if so desired).

What kind of control do I need? What classes should I be looking at.
Any examples out there?

Any help is kindly appreciated.
Bob Powell [MVP] - 01 Jan 2006 13:21 GMT
I would strongly advise against providing a custom designer interface that
doesn't use any of the IDE's familiar features. This would present an
interface that was very confusing to your users.

There are also problems with using controls such as TextBoxes at design time
because of the way the IDE hosts the design surface and the way that
controls interact with it. To do these sorts of thins you need an intimate
knowledge of the design-time systems so an answer here could go on for
hundreds of pages.

I suggest that you familiarise yourself with the principles of design-time
usage first, then perhaps examine something like SharpDevelop that provides
a complete open-source design time implementation.

Signature

Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

>I would like to make a my own control that can be added to other
> projects and used by other developers. When the developer is using the
[quoted text clipped - 24 lines]
>
> Any help is kindly appreciated.
cab0san - 18 Jan 2006 03:51 GMT
Bob,
Thanks for your reply. I have given the matter a considerable amount of
time and thought. I spent some time looking into the way in which
controls are created and persisted in VS2005's IDE. I agree with you
that any new style of editor can cause confusion for a developer.  I
have given up on the idea of a total UI designer surface
replacement/mod due to time constraints (or am I lazy?). While the
propertygrid is an extremely flexible tool for manipulating objects,
collection, and properties, it can be a bit cumbersome to drill down
into several layers of collections. A tree view would perhaps be more
appropriate for that (like the treeview in the tools options menu).

I am leaning towards a compromise. Developers recognize the elipsis as
a starting point for building or adding something. You can use this as
a starting point on the propertygrid to some custom code. Seems pretty
straightforward, but still , it seems like a needle in a haystack
approach (visually , anyway)... now where is that property... :)

I kind of like this approach
http://www.codeproject.com/csharp/DzCollectionEditor.asp

I will also read up on http://www.bobpowell.net/dsv.htm

Thanks for your thoughtful consideration.

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.