Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
Inherited and Designer
posted

Hi,

 

I have a problem and hope you can tell mesomething about the cause.

 

I have Problems whit inherited Forms and showing in the designer.

Example:

I have a Form (A) whit a UltraGrid on it. I set ....DisplayLayout.GroupByBox.PromptApperance.ForeColor = Color.Red;

Then I create a Form (b) that inherents from Form A.

On runtime the ForeColor is shown in red as expected, but on the vs-designer it is black.

Any idea why this is so? And ist there a workarount thst ist shown rignt in VS-designer.

 

Regards,

Wolfgang

  • 469350
    Suggested Answer
    Offline posted

    Hi WolfGang,

    I tried this out and it worked fine for me. But you don't say how you are setting the properties and there's not much information here to go on.

    In my experience, there is all sorts of weirdness when using inherited forms causing by serialization problems. The Visual Studio form designer doesn't handle serialization of sub-objects, particularly collections in a reliable way.

    So if you are going to use derived forms, I recommend that you apply any property settings to the grid in code, rather than via the designer. If you set the PromptAppearance.ForeColor in the constructor of your form, after InitalizeComponent I think that will probably work better.