Hi,
We are converting an existing application towards Delphi 11.2 and TMS VCL UI Pack 10.8.5.0
When we open forms with TAdvStringGrid components in the RAD Studio IDE, we notice that some color properties are automatically changed.
But when we revert the changes, build the application and run, the colors are as expected.
Is this an expected behaviour?
We used the following steps to test this behaviour:
Create a new Windows VCL Application
Open the form
Add a TAdvStringGrid in the form
Change the TAdvStringGrid color property to anything but clWindow
Save the form and close it
Open the form again
Notice that the color has been set back towards clWindow
Sadly, none of those suggestions apply to our situation.
We are not using a VCL Style, no TAdvFormStyler and on all the grids the UIStyle is set to tsCustom.
We noticed, while debugging the component, that after TAdvStringGrid.Loaded was called, TAdvStringGrid.VCLInitStyle is called with argument True from TAdvStringGrid.CmStyleChanged
We believe that this is causing the problem, because with the parameter init being True, the inline-procedure InitColors is called in designtime. Which changes the color properties, after they are loaded from the DFM.
I cannot reproduce this, so please isolate this and provide a sample source project with which we can reproduce the problem here so we can investigate.
Sorry for the belated response with an example project.
It seems that the colors are changed, but no change is detected by RAD Studio.
We noticed that the colors were changed, when we opened one of the forms, changed something and saved the changes. After we opened our git tool, the git difference shows a change of properties we did not change by ourself.
In this example focus on the GridColorLine property. It should be clRed in the belowest grid of TForm1 and in the grid of TForm2, but when you open the forms in RAD Studio it is changed in clSilver.
If you still cannot reproduce, we could make some screenshots showing this.
Do you use the latest version of the components, as I retested this here with your project and both at design-time & run-time I see the red grid line color in the bottom grid:
Sadly enough, after using installing version 10.8.6.0 of TMS VCL UI Pack it still does change the values.
We made a video showing, what is happening at our development machine.
We could now understand this Delphi 11 specific issue.
We've addressed this now. When you set in the next update seClient = false in AdvStringGrid.StyleElements , this will behave as you expect.
We just installed the newest version and applied the suggestions.
It worked with seClient on false, the colors are not changing anymore.
Thank you for the effort!
Just wondering, should be applied this to all our existing grids or will there be another solution for existing grids coming in new versions?