Panel or PropertyGrid in GoSubGraph

Hi,
I want to show the either Property Grid or Panel as a one of the control of the SubGraph. Right now when I try to add a PrpertyGrid object to Subgraph subgraph didn’t apper as it throws exception. Can you please help me in add a Windows control to subgraph so as open will show the control and closing will show only the small iconic node.
Best Regards
Amit
Component Plus

The only kinds of objects you can add to a GoLayer for either a GoDocument or for a GoView are instances of GoObject.
If you want to embed a control in a document, you need to wrap it in a GoControl. For a complex object such as a PropertyGrid, this might involve subclassing PropertyGrid so that you can handle initialization and focus, and using that type as the value of GoControl.ControlType.
The only complex example of this is the RichText class, which is just a GoObject that uses a GoControl in a modal fashion to support editing-in-place of a RichText object. You can look at the RichTextBoxControl subclass of RichTextBox to see how it interacts with the GoControl that is created by the RichText (the GoObject) when the user wants to edit it.

Hi,

Thanks ,
I am able to add a propertygrid as one of the control on the GoDiagram. It appears when the control has a focus but as soon as it looses the focus a blank control,appears over the propertygrid. Is it the problem with painting?
Amit Chavan

I don’t know–I’m not familiar enough with the PropertyGrid control implementation to tell you what’s going on. The behavior seems unexpected to me. I haven’t had that problem when creating other Controls.