TRzGroupBox Color Change Ignored in Delphi 11

Home Forums Konopka Signature VCL Controls (formerly Raize Components) TRzGroupBox Color Change Ignored in Delphi 11

Viewing 3 reply threads
  • Author
    Posts
    • #2781
      Olivier Beltrami
      Participant

        Hello,

        Having moved to Delphi 11, none of my TRzGroupBox components can have their color changed at run-time. I can change the color fine, at design-time, but it reverts to clBtnFace at run-time. And trying to change the color at run-time in code does nothing either.

        I seem to recall Ray mentioning that this is due to the KSVC ignoring properties such as color when they are in “skin mode”. I am not using any skins that I know of, but, clearly Delphi thinks otherwise.

        How can I tweak the KSVC code to be able to change properties of these components at run-time ?

        Very best regards,

        Olivier

      • #2795
        Ray Konopka
        Keymaster

          Hi Olivier,

          What properties have you changed in the TRzGroupBox? I created a test project and set the Color property to clSkyBlue and the VisualStyle to vsClassic, and when I ran the project, the group box appeared blue at runtime.

          Can you duplicate the problem in a test app? If so, please send the source code (no executables) to our support email and I’ll take a look.

          Ray

        • #2804
          Olivier Beltrami
          Participant

            Hi Ray,

            I am really sorry to have bothered you again about the KSVC. I had forgotten that I had patched the RzPanel.pas code back when Delphi 10.4 came out, as below. I have re-applied the patch and all is well now.

            I will try your suggestion for a simple test project, but I must admit that the values vsClassic and vsWinXP are very confusing. Is vsWinXP supposed to be “modern” as it was added at the time of Windows XP, of is it meant to be legacy, as Windows XP is now 20 years old. Playing with this setting has yet to confirm one hypothesis over the other, so I tend not to touch that option.

            Very best regards,

            Olivier

            RzPanel.pas patch

          • #2890
            Ray Konopka
            Keymaster

              The vsWinXP value originally meant, use the new Windows XP Visual Styles (i.e. Themes back in the day). Any when VCL Styles were introduced, vsWinXP by the very nature of how Embarcadero (CodeGear) implemented VCL Styles, the vsWinXP also meant to use the currently active VCL Style.

              Yes, it would most certainly be nice to change the enum value to something more appropriate, but that is not a simple task. Each component that has a property like that would need to have a ReadProperties override in order to “fix up” any reference to that enum that already exists in a DFM file. Although, I believe that is the default value, so maybe there are not that many references to it in actual DFM files.

              Feel free to submit a request into Embarcadero’s Quality Portal to rename the enum.

              Ray

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.