?
Solved

IExtenderProvider - A little more style?

Posted on 2005-04-26
3
Medium Priority
?
436 Views
Last Modified: 2012-06-21
I dont know if this is possible as I cant seem to find a lot of documentation on the subject but the scenario is as follows.

I have a custom control that when dropped into a form gives all the controls on it a new property.  This property is something akin to a help text field but there is a reason for reinventing the wheel :o)

Everything works fine and in design view any controls on the form have this property now but it is a text entry box.  What I would REALLY like to do is replace that text entry box with a button style one that allows to me to display a custom form and capture the results of that.  Something like when you define the columns in a listview.

Any thoughts appreciated.

Stephen
0
Comment
Question by:Kh3ldar
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 13869430
IExtenderProvider is used to give additional properties to a control, such as what the ToolTip provider does.

Is that what you want to accomplish?  Or do you want to design a custom property designer (like the TextAlign/ImageAlign property editor)?

Bob
0
 
LVL 4

Author Comment

by:Kh3ldar
ID: 13869710
Hi LearnedOne.

I beleive from your description I am trying to do both (they appear to be the same thing just done a different way)?

I currently have the custom properties for my controls using IExtenderProvider, they are called HelpProvider_OnFocus_Text.  You can enter text in them (like a ToolTip entry field) in the properties pane and its all saved and does it relevant things when the program is compiled.

What I would like to do is enter rich text or HTML rather than just plain text and typing this into that little textbox on the properties pane will get very frustrating.  The best example I can demonstrate is if you click into something like the Icon property for a form you get an open file dialog and you choose the icon.  The path of the image is then passed back into the properties box. I do not want to open a file using a standard dialog however I want to open a Custom form of my own (rich text / html creation form) - allow the user to enter the relevant text in there and then pass it back to the properties field.  Other examples of this would be the Dock property or the Transparancy key. (Little more elaborate than I intend to do, I just want to open another form)

I hope this is a little clearer.

Stephen
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 750 total points
ID: 13869930
An example of using the EditorAttribute to create a custom property editor:

The ColorPicker WinForms Control:
http://www.codeproject.com/vb/net/a_colorpicker.asp

<EditorAttribute("System.Drawing.Design.ColorEditor"), GetType(System.Drawing.Design.UITypeEditor))>

Bob
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question