views:

211

answers:

1

I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project.

So far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-friendly by allowing in-line editing - does anyone know of an example of how to implement in-line editing within the windows forms designer (just for typing plain text at this stage).

+1  A: 

You will need to create a designer that supports this behavior. For an example, use Reflector to look at the designer the ListView uses for resizing its columns. This should give you an idea of the work involved and what you need to do. There is MSDN documentation on some of this, but it isn't as helpful as you may like it to be.

The ListViewDesigner, in System.Design.dll, provides the column sizing by turning mouse operations in the designer into windows messages that manipulate the underlying list view. Your designer for the textbox will need to do something similar with keyboard events.

Jeff Yates
Thanks I'll give that a go when I get some spare momemts :)
Bittercoder