Home › Forums › Konopka Signature VCL Controls (formerly Raize Components) › ToolButton image disappears when pressed (ver. 7.0)
- This topic has 4 replies, 3 voices, and was last updated 2022-08-09 at 2:48 pm by Tom Chamberlain.
-
AuthorPosts
-
-
September 1, 2021 at 11:18 pm #2568
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
-
September 3, 2021 at 2:13 am #2597
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
-
September 3, 2021 at 3:58 pm #2606
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.
-
September 7, 2021 at 10:34 pm #2615
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
-
August 9, 2022 at 2:48 pm #3180
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.