Hello,
I have a custom control that is added to the grid column via the UltraControlContainerEditor. I have defined both an editting control as well as a rendering control (which happen to be pointing to different instances of the same class). Everything is working when the grid comes up...editting and rendering are solid and I am happy with it. However, if the main grid is sized smaller so that a horizontal scroll bar appears and I actually scroll to the right and then back...then the control drawing gets messed up. When in rendering mode everything is still fine...however when I click on the control (going to rendering mode) my control rendering is "off".
I have tried with both EnterEditModeMouseBehavior = EnterEditModeAndClick and with this not set...to no avail. Do you have any suggestions?
A little more detail:
My custom control contains 3 controls inside of it....a checkbox, picturebox and a label. After I do a horizontal scroll then click on the cell the label control shows up just fine but not the picture box and checkbox.
I opened up Spy++ and tool a look at the custom control. Here is what I saw:
The label controls rect was showing up inside of the rect for the main control. However the checkbox and the picture box rects were well outside of the main controls rect. This explains why they are not drawing. What I don't get is why this is happening....because I am not programatically moving these other two controls.
Hi,
I can't see any reason why the ControlContainerEditor might move the controls within your Editing or Rendering control. But the ControlContainerEditor will manipulate properties on your control such as it's size and position on the screen. So maybe your control is anchoring or docking the controls within it and this docking/anchoring is somehow getting corrupted at some point. I've seen some very strange things happen in Visual Studio when using anchoring and docking. There seems to be some timing bugs that can crop up occasionally.
You might want to handle the Resize event on the control and position the controls within it manually instead of relying on the Docking or Anchoring and see if that helps.