How to make semi-transparent panel in Delphi VCL - delphi

I can easily make semi-transparent panel inside form using Firemonkey's TForm.Transparency and TPanel.Opacity options. But I can't do it in VCL.
I want to make something like this:
Is there any way to do it in VCL application? No third-party component please.
Edit: If I can also make opaque components on the semi-transparent surface, that would be a PLUS.

Related

Issue with BringToFront in Firemonkey

I have two controls on my form.
TWebBrowser with Align set to Client
TMemo with Align set to None
I want to display TMemo on top of TWebBrowser for a particular scenario and for that am using Memo.BringToFront but it does nothing.
Am I missing something?
TWebBrowser Is a particular firemonkey Control. Firemonkey control are "paint" according to their z-order on a openGL surface (ie: the form). but TwebBrowser is a native control that is draw on another surface that is placed on the top of the form, hidding in this way everything back to it.
The only way you can do is to show you memo inside another window on the top of the TwebBrowser. for this you can use a native Memo. As far as i know their is only one native memo implemented on android (delphi already have some that work on ios/windows) it's https://github.com/Zeus64/alcinoe

Tabbed Docking interface like photoshop

I was wondering which component to use to get the same tabbed docking that photoshop using, in photoshop you can dock panels as tabs and you can reorder them by dragging the tab or you can dock them together under each other,
I have tried to mimic same results with the jvcl and lmd docking components but apperantly they are not same with the system of photoshop using,
can you let me know which component to use to get the same result or anyone has any example for me to study and work on
LMD Docking is ubdoubtedly the closest thing you will come across for delphi. We use it in FinalBuilder and you can definitely drag docked tabs around like in in photoshop. FinalBuilder - an example implementation of LMD Docking

Embedding a VCL form in an FMX ScalingLayout

I am trying to embed a VCL form in an FMX form, where the FMX form contains a TScalingLayout set to alClient so that on form resize the entire content is scaled.
The only way I have found to embed the VCL form in FMX Form in the first place is like so:
VCLForm.ParentWindow := WindowHandleToPlatform(FMXForm.Handle).Wnd;
VCLForm.Show;
Unfortunately this leaves me unable to parent the VCLForm to my TScalingLayout directly, so when I resize my FMX form naturally the embedded VCL form does not scale.
I thought that if I can only put the VCL form onto a form directly I could just use another FMX form as a container and embed this container form in my ScalingLayout, but since I can only "embed" an FMX form in another by moving all its children my VCL form won't be moved.
Is there a way to embed my VCL form in a way that will scale its content in the same way all the FMX controls on my ScalingLayout are scaled ?
No it is not possible. The reason Firemonkey can scale its components is because Firemonkey makes and draws them all by itself from scratch.
Most VCL controls are made out of built-in Windows OS components that your program calls. And those don't have any ability to scale. They are not drawn by the VCL, the VCL tells Windows to draw them. So if FMX does not draw them, it cant scale them.

Delphi XE5 Android TButton colors

I need change color of 50 buttons in one form.
Every button another color and color want to set by code(no design editor).
It is firemonkey mobile application.
By my opinion, without making your own button that doesn't use FMX styles completely (which would break multiplatform compatibility if you are looking forward to support multiple platforms with their native styles), you may apply some filter on top of each of those buttons but on some styles this may cause the text not to be visible, implementing your own filter might get you the desired result:
Effect:=TFillRGBEffect.Create(Self);
Effect.Color:=$80FF0000;
Effect.Parent:=SomeButton;
Another way would be to take advantage of TColorButton with TText on top of it, but this way the entire button won't be filled with your color, but you can modify default/custom style for each platform in order to get what you need (this indeed needs to be done in the designer but you would have to create just one style for each platform you need to support and not 50 for each button):
Button:=TColorButton.Create(Self);
Button.Color:=$80FF0000;
Text:=TText.Create(Button);
Text.Parent:=Button;
Text.Align:=TAlignLayout.alClient;
Text.Text:='Hello';
Text.HitTest:=false;
Button.ClipChildren:=true;
Button.Parent:=Self;

TGridPanel no transparency if themes disabled in Win7

I have a form filled with a TImage. I put over this a TGridPanel. If themes are enabled in Windows 7 the TGirdPanel appears with transparency. If themes are disabled (no visual styles) the TGridPanel loses transparency and hides the part it ocupies. I use Delphi XE2
Is there any workaround for this?
That's a basic fact of life for panels. It's not special to the TGridPanel, you will see the same effect for any control derived from TCustomPanel. The transparency is only supported when the application is themed.
The grid panel is just a convenient way to layout your controls. If you want to support running unthemed then the simplest solution is to remove the TGridPanel and layout your controls manually. That's pretty much trivial to do. Handle the OnResize event of the control that currently contains the panel, and position your controls as desired.

Resources