ToolButton image disappears when pressed (ver. 7.0)

Home Forums Konopka Signature VCL Controls (formerly Raize Components) ToolButton image disappears when pressed (ver. 7.0)

Viewing 4 reply threads
  • Author
    Posts
    • #2568
      Marek J.
      Participant

        Add ToolButton to TrzToolbar.

        Set TRzToolbar.VisualStyle=vsGradient

        Set ToolButton.ToolStyle=tsDropDown

        Set ToolButton.VisualStyle=vsGradient

        Define any popup menu PopupMenu1 and set ToolButton.DropDownMenu=PopupMenu1

        Run the program.

        The button in the toolbar is OK:

        Now click on the button:

        The image of the button is not visible.

        Greetings,

        Marek

      • #2597
        Ray Konopka
        Keymaster

          Hi Marek,

          Thanks for the report. I am able to duplicate the issue. I’ll have to dig into the changes that Embarcadero made for version 7 to see what is going on. I am also finding out from Embarcadero how customers should report bugs (like this) on the components.

          Ray

        • #2606
          Marek J.
          Participant

            For me the following change works:

            procedure TRzToolButton.DrawArrow;

            ……

            else { FState = tbsDropDown }

            …..

            // must be commented   PaintGradient( Canvas, R, gdHorizontalEnd, C2, C1 );

             

            Ray, I need two minutes to write some post here.

            I’ve tried Embarcadero several times and it just doesn’t work. Jira hangs up.

             

          • #2615
            Ray Konopka
            Keymaster

              Hi Marek,

              I’m sorry to hear you are having issue with Embarcadero’s Quality Portal (i.e. Jira). I have not had those experiences.

              As for your fix, that is interesting. I’ll have to look more closely at the code when I get some time, but I find it odd that the PaintGradient call is causing the problem. I suspect it is masking something else.

              Ray

            • #3180
              Tom Chamberlain
              Participant

                We are having the same problem, but only for buttons that do not have an action attached to them. So instead of commenting out code in the component, we implemented a little hack: (force the dodropdown)

                THackRZButton = class(TRZToolButton)
                public
                Procedure DoDropDown; override;
                end;

                procedure THackRZButton.DoDropDown;
                begin
                inherited DoDropDown;
                end;

                Then add the onclick event (not an action) to the button itself and call the hack to force the dropdown:

                THackRzButton(Sender).DoDropDown;

                This works for us, gives the same results as the original TToolbar we are replacing because it doesn’t work correctly under High-DPI.

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