TPanel in Embarcadero Rad Studio - delphi

I have a TMapView. Above the TPanel. Problem is that the map visible through the TPanel. How to make background non-transparent for TPanel

There are no way to show panel (or any other styled FMX control) on the TMapView, TWebBrowser, other controls with ControlType = Platform (like TEdit) on mobile platforms.
TMapView is a wrapper around native control. Native controls always shown on top of form because of differences in the mechanism of rendering. Like in VCL, TEdit always displayed above TLabel, because TEdit is descendant of TCustomControl, which painting controlled by OS, and TLabel is descendant of TGraphicControl, which painting controlled by form.
If you want to show some controls above TMapView/TWebBrowser, etc..., you should use only native controls.
a good explanation is given on http://www.tmssoftware.com/site/fmxicl.asp

Related

Webbrowser component behind TpopUpMenu does not respond

I am using Delphi 10.2 Tokyo and the VCL component from TMS Software named WebOSMaps. That component uses a TWebBrowser component to display a map with several markers on it.
Over a marker I use a TPopupMenu to display my own menu. My problem is, if the PopupMenu is open, there is no interaction with other components on that Form, like OnMouseOver or OnClick. If I right-click on another position of that TWebBrowser, the TPopupMenu shows up again, but with the same information as before, because of there is no interaction with the OnMouseDown event of the TWebBrowser.
Any suggestions?

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

How to paint all VCL Styles tab sheet controls to a given canvas when the tab is not visible to the user?

Using C++ Builder 10.2, VCL & VCL Styles...
I have a TPageControl that has TFrames on each of its TTabsheets. One of these frames contains some TEdit controls that show data read from a device. After the reading is acquired and the frame is updated, the system may create a screenshot of this frame and store it in a jpeg file.
Since the TTabsheet in the TPageControl with the TEdit controls may not be visible when the jpeg is created, the jpeg may not have the text contents of the TEdit controls painted. This has given me fits.
I have found that by using a TStaticText that is styled, the text appears in the jpeg. This seems to be due to the fact that TStaticTextStyleHook.Paint (in VCL.StdCtrls.pas) draws the control itself rather than letting Windows do it.
There are two problems with using TStaticText. Selecting the SystemStyle choice (Windows) causes TStaticTextStyleHook.Paint to skip painting the control itself and delegates to Windows (I think). Also, the appearance of TStaticText isn't exactly what I want, but I may have to live with it.
Is Windows refusing to paint TEdit control contents because the parent is not Visible?
Is there a way to force Windows to paint the TEdit controls in this situation?
UpdateWindow() and RedrawWindow() does not work.

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.

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