How to set TPanel transparent? - ios

When placing the TPanel component in designer, it seems it can not be made transparent? There's an opacity option, but that only deails with animations. I want the panel itself to be fully transparent, so I can see the image underneath. (I want to use the panel as a way of control layout of the controls placed on it)

Use TLayout or TRectangle instead of TPanel.

You can use almost any object opacity for that, for example:
Panel1->Opacity=0.5;

Related

Making `TStaticText` transparent

I have to use TStaticText instead of TLabel to make my software friendly to screen-readers because TStaticText has window handle and TLabel does not.
However, even though TStaticText has Transparent property, it is not really transparent on a gradient background.
Can anyone recommend way how to make it transparent or perhaps how to make a simple custom component which would be compatible with screen readers (having window handle that is) and be transparent at the same time?

How can I apply a vcl style to a TPanel?

I can change the appearance of VCL buttons by using the bit map stile designer with specifying a bitmap to [Objects]-[Button]-[Face]-[Bitmap].
So I tried to change the VCL panel's appearance in the same way with [Objects]-[Panel]-[Frame]-[Bitmap] and [Objects]-[Panel]-[FrameNoCaption]-[Bitmap].
The test dialog shows that buttons are rendered in an expected way, but panels are not.
How can I apply a VCL style to a TPanel?

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.

Transparent background color in TGroupBox - DELPHI

How can i set transparent background color in TGroupBox?
In my Delphi's form I have a GroupBox and a Panel (graphically overlaid).
I wrote a procedure to draw a gradient fill on the Panel using Rect. It works!
Now I have another problem: GroupBox backgound color descends from the Form but I wish it was the same of Panel. I can't put GroupBox into Panel because draw procedure fill the entire Panel area (also GroupBox).Is there a way (by code) to set trasparent background color of GroupBox?
set parentcolor of the groupbox to true
I solved setting at runtime the Parent property of the GroupBox.

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