Hello,
I'm using UltraControlContainerEditor with to RichTextBoxes (one as EditControl, one as RenderControl).
Using the RichTextBox as RenderControl doesn't work, it only displays the borders. After looking at the sources i think the problem is that DrawToBitmap does not work for RichTextBoxes.
Another thing is that the ControlContainerEditor expects for the EditControl an event with the Name propertyname + "Changed". That is also not suitable for an RTF-Edit using the Rtf-Property. There is no RtfChanged-Event only a TextChanged-Event. My workaround is a new control derived from RichTextBox which exposes the TextChanged-Event also as RtfChanged-Event.
Is there a workaround for the first issue regarding the RenderControl?
kind regards
Oliver
Ironically there is a C# WinGrid sample, 'RichTextEditor', which demonstrates how to turn a RichTextEditor into an embeddable editor that can be hosted in a grid cell. The degree of difficulty in implementing a custom embeddable editor, such as that which is demonstrated by that sample, was one of the reasons we decided to add the UltraControlContainerEditor.
One of the limitations of the UltraControlContainerEditor is that it works best with controls that follow the .NET model for rendering itself, and the RichTextBox is one of the worst offenders in that regard, being in actuality a very old control for which MS created a .NET wrapper.
I don't think there is a realistic workaround for the issue you describe here, although the RichTextEditor sample does demonstrate how to render the rich text using the windows messages supported by that control.