2

When I add a TDBNavigator to my project, and mark the option FLAT = TRUE, immediately the background colour of my TDBNavigator changes to black, totally losing its characteristic.

When I run the application, TDBNavigator is as shown in the picture, black.

How to solve this problem?

I am using the c++ builder 10.3.3

TDBNavigator

borgomeister
  • 996
  • 6
  • 13
  • I observed that this happens when tdbnavigator comes after another component in the toolbar. If it is the first component (from left to right), this problem does not happen. – borgomeister Sep 23 '20 at 11:46
  • 1
    I checked your problem with C++ Builder 10.4.1 and cannot reproduce. Maybe you should consider upgrading? Note: I created a new VCL C++ project, added a TEdit, added a TDbNavigator, set Flat=TRUE, compiled and ran. Everything looks OK. – fpiette Sep 23 '20 at 11:59
  • Ok! maybe this is a bug fixed in the new version. – borgomeister Sep 23 '20 at 12:24

2 Answers2

2

I got an alternative. It seems to me a problem with the transparency of these components.

When I insert a TPanel in the toolbar, the same problem occurs. But in TPanel, I have a ParentBackGround property. When I mark it as false, the background of the TPanel becomes transparent again.

So I used the following alternative.

  • 1 - Insert a TPanel into the toolbar

  • 2 - Place the ParentBackground TPanel property = false

  • 3 - Move TDBNavigator into the TPanel

  • 4 - Change the TPanel properties:

    a) BevelEdger = false (all) b) Autosize = true c) BorderStyle = bsNONE d) BevelInner = bsNONE e) BevelKInd = bsNONE f) BevelOuter = bsNONE g) Delete CAPTION from panel

  • 5 - Change FLAT property of TDBNavigator to TRUE;

That's how it worked.

borgomeister
  • 996
  • 6
  • 13
1

With 10.4.1 and clang compile a runtime TDBNavigator icon background is black. I opened an issue https://quality.embarcadero.com/browse/RSP-31245

screenshot TDBNavigator

Tony
  • 11
  • 2