Do you have any idea why we occasionally lose our GridLines property settings during development? Sometimes the code generator will simply remove them; other times they are replaced by a New generated iGPenStyle.

Thank you.
No ideas. Most likely, this is related to the WinForms Designer because it is responsible for serializing properties.

Does it happen only with the GridLines property? What about other object properties, like iGrid.Header or iGrid.RowHeader?
It also occurs with VScrollBar.CustomButtons. As to Header and RowHeader I do not know, as we supply these properties from tables. In fact, we supply most properties from tables. I have not yet incorporated the GridLines properties into this schema. I plan to, some day. I agree that the WinForms designer is overwriting these properties. I have not been able to determine why this happens.
Try, at least, to find a sequence of actions that leads to this problem.

As a workaround, I can suggest setting the GridLines and other properties that are erased from code.

But what about simple (scalar) properties like BackColor or ReadOnly? Do they also lose their non-default settings?
Yes, we routinely write again all those missing GridLines properties in their respective Classes/Form designer files. The issue has only occurred with "nested" properties - never with basic properties. I have not been able to pinpoint exactly when it occurs. If I manage to I'll let you know. Thank you.
Might look like a temporarily bug in a WinForms Designer serializer or something like that. If possible, try to find another version of VS and reproduce the problem in it. For example, if you are using VS 2022, install VS 2019 and try to reproduce the problem in it.
Similar Topics
Users browsing this topic