cab327
cab327

Reputation: 47

Lines on toolbar TSpeedButtons with Delphi Style

When I apply a style to my Delphi project, my TToolbars show strange behavior with TSpeedButtons. There will be an extra line on the left side of each TSpeedButton that should not be there. Mousing over the button makes these lines show/hide, and mousing over to another group of TSpeedButtons separated by a TToolButton separator can cause a horizontal line to briefly appear across the whole Toolbar and make the previously moused over buttons' left lines reappear.

This happens with all of the styles I have applied, and is easily reproducible in a brand new VCL project by adding a TToolbar, adding a couple TSpeedButtons, and applying some style to the project.

Why is this happening and how do I make this not happen? I want the style to apply and keep the buttons flat without the left lines and this behavior.

I have tried playing with the TToolbar and TSpeedButton properties, but have had no success.

Edit:

Steps to reproduce the vertical lines in Delphi 11.1:

  1. Create new vcl project.
  2. Add a Win32 TToolbar from the tool pallette.
  3. Add one to many TSpeedButtons to the Toolbar.
  4. In Project>Options>Application>Appearance select a Delphi style (I am using Windows 10 Dark and Windows 11 Modern Dark from GetIt but the issue has been noticeable on all styles). Make sure the chosen style is set as the default style.
  5. Run the project.

This has the left side lines that I don't want.

To get the lines showing/hiding, I set the TSpeendButton's properties for Flat to True and I set the Transparency to False. For the Toolbar I set Transparent to False as well. This achieves the look I want for the buttons when no project style is applied and has no weird lines. Then right click the Toolbar and add a separator. Place some buttons on either side of the separator. As you move the cursor over the separated buttons, the lines will come and go.

As for the horizontal line I can't seem to get a consistent way to reproduce that at the moment.

Here are images for what I see: enter image description here

enter image description here

Upvotes: 0

Views: 108

Answers (0)

Related Questions