TRzToolButton gets larger than expected

Home Forums Konopka Signature VCL Controls (formerly Raize Components) TRzToolButton gets larger than expected

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #4526
      Uwe Raabe
      Participant

        With V8.0 the method TRzToolButton.CheckMinSize was changed in a way that makes sure that the button is somewhat larger (8 pixel on 96 dpi) than the image, while before it could as well be the same size as the image. Unfortunately there is no way to configure that padding size nor is CheckMinSize virtual to allow an inherited class to override that behavior.

        In my applications I make heavy use of TRzToolButton where the images have to be the same size as the buttons. V8.0 breaks that completely.

      • #4527
        Ray Konopka
        Keymaster

          Hi Uwe,
          I’ll look to adding a property to control that. Of course, in the meantime, you can revert that method back to its original version and use the !Build_KSVC.cmd to rebuild the components and packages.

          However, I also have to ask how exactly are you using the TRzToolButton controls with images the same size as the button? What I mean is that with the old code, something is going to be off with using an image size the same as the button size. Either the button’s border is getting covered, or the image is getting clipped.

          Do you have a screenshot of your interface?
          Ray

        • #4528
          Uwe Raabe
          Participant

            I use it without any borders by overriding DrawBtnBorders omitting the inherited call to achieve that.

            The buttons are placed inside a TGridPanel without any margins, so they are more like tiles:

          • #4557
            Ray Konopka
            Keymaster

              Hi Uwe,
              I’m packaging up the KSVC source for a new update. I forgot to let you know, but I added a new ImagePadding property to the TRzToolButton. It defaults to 8, which is the current behavior. However, if you change ImagePadding to 0, you will get the old behavior and you’ll be able to have the button be the same size as the image. In other words, the button’s size will not grow to fit the image size.
              Ray

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