Hi,

I'm in the process of customizing the PropertyGrid for an
application. I've written several TypeConverters and a
few editors to display and process data within the grid.
What I haven't been able to do yet is have the editor
control receive the mouse input from another window.

For example, I have a CAD app and I want modify a line
entity. I select the entity and its properties are
displayed in the PropertyGrid. I select the beginning
coordinate field in the PropertyGridwant to modify the
coordinate of the beginning point by selecting the
location in the graphics window. Is this possible, or do
I just need to create my own custom version of the
PropertyGrid??

What I would ideally like to do is embed an existing
custom control inside the PropertyGrid.

TIA,
Peter

Re: PropertyGrid customization by Bob

Bob
Mon Nov 24 14:10:36 CST 2003

You can make a UITypeEditor that responds to mouse operations. The sample
Angle editor is such a control.

To edit a property from a main graphics window, just update the property in
the selected object as normal by editing with the mouse and refresh the
property grid at each mouse move. The values will be updated.

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

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

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

Read my Blog at http://bobpowelldotnet.blogspot.com

"Peter" <msdnco@trimble.com> wrote in message
news:0c7001c3b2bb$31193570$a001280a@phx.gbl...
> Hi,
>
> I'm in the process of customizing the PropertyGrid for an
> application. I've written several TypeConverters and a
> few editors to display and process data within the grid.
> What I haven't been able to do yet is have the editor
> control receive the mouse input from another window.
>
> For example, I have a CAD app and I want modify a line
> entity. I select the entity and its properties are
> displayed in the PropertyGrid. I select the beginning
> coordinate field in the PropertyGridwant to modify the
> coordinate of the beginning point by selecting the
> location in the graphics window. Is this possible, or do
> I just need to create my own custom version of the
> PropertyGrid??
>
> What I would ideally like to do is embed an existing
> custom control inside the PropertyGrid.
>
> TIA,
> Peter



Re: PropertyGrid customization by Peter

Peter
Mon Nov 24 14:42:18 CST 2003

Hi Bob,

Thanks for the reply. Which sample Angle editor would
that be?

Peter
>-----Original Message-----
>You can make a UITypeEditor that responds to mouse
operations. The sample
>Angle editor is such a control.
>
>To edit a property from a main graphics window, just
update the property in
>the selected object as normal by editing with the mouse
and refresh the
>property grid at each mouse move. The values will be
updated.
>
>--
>Bob Powell [MVP]
>C#, System.Drawing
>
>The November edition of Well Formed is now available.
>Learn how to create Shell Extensions in managed code.
>http://www.bobpowell.net/currentissue.htm
>
>Answer those GDI+ questions with the GDI+ FAQ
>http://www.bobpowell.net/gdiplus_faq.htm
>
>Read my Blog at http://bobpowelldotnet.blogspot.com
>
>"Peter" <msdnco@trimble.com> wrote in message
>news:0c7001c3b2bb$31193570$a001280a@phx.gbl...
>> Hi,
>>
>> I'm in the process of customizing the PropertyGrid for
an
>> application. I've written several TypeConverters and a
>> few editors to display and process data within the
grid.
>> What I haven't been able to do yet is have the editor
>> control receive the mouse input from another window.
>>
>> For example, I have a CAD app and I want modify a line
>> entity. I select the entity and its properties are
>> displayed in the PropertyGrid. I select the beginning
>> coordinate field in the PropertyGridwant to modify the
>> coordinate of the beginning point by selecting the
>> location in the graphics window. Is this possible, or
do
>> I just need to create my own custom version of the
>> PropertyGrid??
>>
>> What I would ideally like to do is embed an existing
>> custom control inside the PropertyGrid.
>>
>> TIA,
>> Peter
>
>
>.
>

Re: PropertyGrid customization by Bob

Bob
Mon Nov 24 16:43:22 CST 2003

Look at the sample in the UITypeEditor help.

Search for AngleEditor in MSDN.
--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

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

Read my Blog at http://bobpowelldotnet.blogspot.com

"Peter" <msdnco@trimble.com> wrote in message
news:56a901c3b2cb$737b46f0$a601280a@phx.gbl...
> Hi Bob,
>
> Thanks for the reply. Which sample Angle editor would
> that be?
>
> Peter
> >-----Original Message-----
> >You can make a UITypeEditor that responds to mouse
> operations. The sample
> >Angle editor is such a control.
> >
> >To edit a property from a main graphics window, just
> update the property in
> >the selected object as normal by editing with the mouse
> and refresh the
> >property grid at each mouse move. The values will be
> updated.
> >
> >--
> >Bob Powell [MVP]
> >C#, System.Drawing
> >
> >The November edition of Well Formed is now available.
> >Learn how to create Shell Extensions in managed code.
> >http://www.bobpowell.net/currentissue.htm
> >
> >Answer those GDI+ questions with the GDI+ FAQ
> >http://www.bobpowell.net/gdiplus_faq.htm
> >
> >Read my Blog at http://bobpowelldotnet.blogspot.com
> >
> >"Peter" <msdnco@trimble.com> wrote in message
> >news:0c7001c3b2bb$31193570$a001280a@phx.gbl...
> >> Hi,
> >>
> >> I'm in the process of customizing the PropertyGrid for
> an
> >> application. I've written several TypeConverters and a
> >> few editors to display and process data within the
> grid.
> >> What I haven't been able to do yet is have the editor
> >> control receive the mouse input from another window.
> >>
> >> For example, I have a CAD app and I want modify a line
> >> entity. I select the entity and its properties are
> >> displayed in the PropertyGrid. I select the beginning
> >> coordinate field in the PropertyGridwant to modify the
> >> coordinate of the beginning point by selecting the
> >> location in the graphics window. Is this possible, or
> do
> >> I just need to create my own custom version of the
> >> PropertyGrid??
> >>
> >> What I would ideally like to do is embed an existing
> >> custom control inside the PropertyGrid.
> >>
> >> TIA,
> >> Peter
> >
> >
> >.
> >



Re: PropertyGrid customization by Peter

Peter
Tue Nov 25 12:31:37 CST 2003

I found the AngleEditor and applied the changes to my
codes. It did display my custom control correctly.
However when I proceded to pick the coordinate location,
which is in a seperate window, the control never received
the input. Probably because the control is dismissed
when you click outside of it. If I type the coordinate
in the custom control it works correctly.

There seems to be a dialog created behind the scenes
which hosts the control. This dialog also seems to be
altering the focus. When the PropertyGrid is displayed,
the focus is still on the main window of the app. When
you click the down button the focus is no longer on the
main window of the app.

I know AutoCAD had a control on the PropertyGrid which
works the way I want mine to. I don't know if they have
created a custom PropertyGrid or not.

Any thoughts??

Peter
>-----Original Message-----
>Look at the sample in the UITypeEditor help.
>
>Search for AngleEditor in MSDN.
>--
>Bob Powell [MVP]
>C#, System.Drawing
>
>The November edition of Well Formed is now available.
>Learn how to create Shell Extensions in managed code.
>http://www.bobpowell.net/currentissue.htm
>
>Answer those GDI+ questions with the GDI+ FAQ
>http://www.bobpowell.net/gdiplus_faq.htm
>
>Read my Blog at http://bobpowelldotnet.blogspot.com
>
>"Peter" <msdnco@trimble.com> wrote in message
>news:56a901c3b2cb$737b46f0$a601280a@phx.gbl...
>> Hi Bob,
>>
>> Thanks for the reply. Which sample Angle editor would
>> that be?
>>
>> Peter
>> >-----Original Message-----
>> >You can make a UITypeEditor that responds to mouse
>> operations. The sample
>> >Angle editor is such a control.
>> >
>> >To edit a property from a main graphics window, just
>> update the property in
>> >the selected object as normal by editing with the
mouse
>> and refresh the
>> >property grid at each mouse move. The values will be
>> updated.
>> >
>> >--
>> >Bob Powell [MVP]
>> >C#, System.Drawing
>> >
>> >The November edition of Well Formed is now available.
>> >Learn how to create Shell Extensions in managed code.
>> >http://www.bobpowell.net/currentissue.htm
>> >
>> >Answer those GDI+ questions with the GDI+ FAQ
>> >http://www.bobpowell.net/gdiplus_faq.htm
>> >
>> >Read my Blog at http://bobpowelldotnet.blogspot.com
>> >
>> >"Peter" <msdnco@trimble.com> wrote in message
>> >news:0c7001c3b2bb$31193570$a001280a@phx.gbl...
>> >> Hi,
>> >>
>> >> I'm in the process of customizing the PropertyGrid
for
>> an
>> >> application. I've written several TypeConverters
and a
>> >> few editors to display and process data within the
>> grid.
>> >> What I haven't been able to do yet is have the
editor
>> >> control receive the mouse input from another window.
>> >>
>> >> For example, I have a CAD app and I want modify a
line
>> >> entity. I select the entity and its properties are
>> >> displayed in the PropertyGrid. I select the
beginning
>> >> coordinate field in the PropertyGridwant to modify
the
>> >> coordinate of the beginning point by selecting the
>> >> location in the graphics window. Is this possible,
or
>> do
>> >> I just need to create my own custom version of the
>> >> PropertyGrid??
>> >>
>> >> What I would ideally like to do is embed an existing
>> >> custom control inside the PropertyGrid.
>> >>
>> >> TIA,
>> >> Peter
>> >
>> >
>> >.
>> >
>
>
>.
>