tPanels shown on top of Panel that contains tchart is transparent (Delphi) - delphi

I have a frame with a panel.
on the panel is a tchart graph and custom panel that overlays the graph (so it's on top of the graph, with the user toggling which one is showing).
Additionally, I have 3 other panels that contain text, that user also toggles visible/not visible.
the problem: starting in Delph 10.4, the panel is showing sections of the chart. the problem didn't exist in Delphi Seattle (and untested in 10.2 and 10.3), but in 10.4, I can't show the 3 panels without showing sections of the chart.
To replicate, add a panel to a form, put a chart on the panel. add a second panel to the form, not visible, with some text. add a right click menu to set the panel visible. sections of the chart are 'bleeding through' the panel. This also happens with group boxes.
this is what it looks like:
question is: how can I get the panels to show correctly?
How I want it to look:

I can reproduce this in Delphi 10.3 Rio
This happens only if the panel is added as child control of the TChart component and has its ParentBackground property enabled (enabled by default).
I'm guessing that TChart background is drawn with transparency at some level. And when ParentBackground property of any child component is enabled backgroud of such components is also drawn using transparency.
Disabling the ParentBackground property of your Panels will solve your problem.

Related

OSX scroll bars for TMemo and TListBox

Using Delphi XE7 Firemonkey
I've dropped a TMemo on a blank form and then added more lines of text to the TMemo than it can hold (so that scrolling is necessary).
On Windows everything works as expected. The vertical scroll bar appears when the TMemo has more lines than can be displayed.
On Mac, nothing visual appears where the scroll bar should be.
I can click on the TMemo and use the mouse wheel to scroll. I can also press the up and down arrow keys on the keyboard to scroll.
What would prevent the scrolling tools from appearing when the mouse is hovering over the TMemo?
You need to set the AutoHide property to False.
See http://docwiki.embarcadero.com/Libraries/Rio/en/FMX.Memo.TMemo.

How to scroll a TTabSheet

I'd like to scroll an individual TabSheet within a PageControl if the height of the sheet becomes less than a value.
If I put a ScrollBox on the TabSheet, the themed background of the TabSheet is not painted (it's overwritten by the single color background of the scrollbox).
I've been trying to find / create a transparent scrollbox component with no luck. Any other ideas?
I'm using Delphi 7.
Thanks!
To answer my own question, TMS has a transparent scrollbox component called "TAdvScrollBox" that works with themed tabsheets too:
http://www.tmssoftware.com/site/asb.asp
Maybe this will help somebody:
There is a small bug with the component that turns the ParentCtl3d property to false causing ListViews to be rendered with a black border instead of a 3d one. It's easy to fix by setting ParentCtl3d to true programmatically on FormCreate.

Caption of Panel is not aligned like captions of other components in Form

we're using a Form instance of vaadin. Now the TreeTable or TextFields have their captions on the left of the component. But at the panel the caption is above the panel and not on the left.
Is there a way to fix it? For example by placing a caption manually or telling the panel, that their caption is like a normal caption?
Fabian
In Vaadin most of the components delegate their caption handling to the parent component container. However, it's possible that a component handles its caption by itself. Button and Panel are examples of such components.
You can solve your problem by wrapping the Panel inside a CssLayout and by moving the caption from the Panel to the layout.

VCL Styles possible bug with drawing scrollbars

I have a pagecontrol in the center of my main form (form1 in my image), and I want to open other forms docked into the pagecontrol. Because I have many controls on my child form, I need both vertical and horizontal scrollbars (on the child form I have active scrollbars option active), but here is the catch: when I use VCL Styles, my scrollbars aren't drawing as they should be and they are unusable. Is this some kind of a bug of VCL Styles?
The scrollbars (TControlScrollBar) used by the TForm doesn't support the Vcl Styles (you must report this to the QC page), if you want fix that you must override that control and paint the scrollbars using the Vcl styles methods, but that will requiere a lot of work, as simple workround you can use the TScrollBar component (in your form) which properly supports the vcl styles.

Why TPanel does not show correct frame/border in Delphi XE?

Tpanel does not show the top and left border under Delphi XE/Win 7.
Why?
Example (I just dropped few TPanel from pallete to my form, inside of a TTabSheet):
How do I make it look like the original Delphi 7 control (with all 4 borders), without changeing its properties every time I place it on my form?
Set ParentBackground to false.
Above is a blue panel on a green form (ParentBackground = false). Notice the white upper-left border and the gray bottom-right border. Of course, if both the form and the panel are white, the white border will become invisible.
That is how it meant to be drawn. The 3D effect is as if there was a light source shining from the top left. That's why the bottom and right edges are in a shadow cast by the raised panel.
Regarding your updated question, it sounds like you want your application to run without themes. The easiest way is to uncheck "Enable runtime themes" in the Application pane of the project settings.
But of course that would look odd nowadays. If you are using the panel to group related controls, perhaps a group box would be better. My instincts are that panels with raised borders will look poor on modern themed Windows.

Resources