I am trying to create a multi device Firemonkey app. I want to have a memo where I can change font for individual text. But I am not seeing any RichEdit component to do this. Or can I achive this using some other component?
For example how can I do something like this?
Summary: Delphi is famous as the ancient sanctuary that grew rich as the seat of the oracle that was consulted on important decisions throughout the ancient classical world. Moreover, it was considered as the navel (or centre) of the world by the Greeks as represented by the Omphalos.
Embarcadero does not (yet?) provide a RichEdit component for FireMonkey. You will have to use a 3rd party component, such as this one:
Professional Rich Edit Component For Delphi XE7 Firemonkey On Android, IOS, OSX, And Windows
Related
I'm trying to create an Android (multi-device) application with Delphi 10.2 that uses TWebBrowser. I load a URL and I want to parse its contents for fields, but I don't know how do it.
I read this excellent guide: http://www.cryer.co.uk/brian/delphi/twebbrowser/twebbrowser_oleobject.htm#OleObject.Document, but the property WebBrowser.OleObject.Document doesn't exist.
Can somebody help me, please?
The TWebBrowser for FMX is completely different from TWebBrowser for VCL. The VCL one makes use (for access to the Document, etc) of interfaces provided by Internet Explorer, or rather the DLLs on which it is based. IE only runs on Windows, so you shouldn't be surprised to learn that the interfaces it provides are not available on FMX.
The FMX TWebBrowser is a completely different and far more limited beast. It is not automatable in the same way TWebBrowser for VCL/Windows is, and some would say that is a good thing.
Considering the grief we've been having with VCL styles in Delphi 10.2 Tokyo around its use in dynamic link libraries and how it affects the built-in help viewer, as well as a number of negative comments from the community about VCL styles in general, is there another way that we can colour the application windows as in the examples below:
This feature has been part of the application since it's inception in 2001 and it vital for a number of our largest clients, as they actually maintain separate accounts for their subsidiaries and use the colours as an indication of which company they are working with.
Here are the third party skinning products I found so far:
TMS Skin Factory. This has been discontinued.
VCL Styles Utils. This extends VCL Styles and the issues with 10.2
Tokyo remain.
VCLSkin. This has not been updated since XE6.
Almediadev. Just like with DevExpress, we would need to replace all the standard controls with their specific versions in order to apply their skins.
I will update my answer as I find more.
Unfortunately, any answer where we have to replace the components offered by Vcl.StdCtrls or Vcl.ComCtrls with versions specific to the third party package is not going to work. We have 2500 TButtons alone across all the programs in the suite.
EDIT: In the end, we found an answer, or workaround, to the System Exception problem that had us looking at alternatives to VCL Styles in the first place:
Using VCL Styles in a DLL causes System Exception in 10.2 Tokyo
Even though it is not officially supported by Embarcadero there are many examples showing that you can include a FMX form in a VCL application e.g. MonkeyMixer and this SO question.
However, when I create a test application with only one empty VCL form and one empty FMX form, I get two problems:
There are two application icons in the task bar (apparently one for
each instance of TApplication i.e. VCL and FMX)
It crashes when I close the application (when it calls TStyleManager.UnInitialize in FMX.Forms.FinalizeForms).
How can I make this work?
I need this combination as we want our application to be native on Windows, Mac OS and iOS. Therefore on Windows it is a VCL application and the other OS's are FMX using the TMS native components. We have some large custom graphical components that are made for FMX, and they must also work on Windows.
Edit:
I see only two alternative solutions, and I like none of them:
Use FMX on Windows too. I don't like the idea of styled components instead of native. Experienced users can easily tell the difference.
Maintain to sets of our custom components: VCL and FMX editions. That will require some work, and also the graphical features of FMX are much better than VCL.
I've needed to host an FMX app inside a VCL app for display and training purposes. The FMX app is really an Android target and the VCL a Windows 'demonstrator'. The FMX hosting is done using TFireMonkeyContainer hosting the FMX main form. Yes it's got slight wrinkles but it works ok and I'm sure we'll find a way to improve things.
My FMX main form is created at runtime and has visibility of only FMX.Forms. It is then passed to TFireMonkeyContainer and is destroyed by it when the VCL app closes.
Win7 must give ok style for TSpinEdit, but I see outdated style:
So arrows are not themed, and buttons are old.
I use Delphi7. How to patch VCL to fix style?
OK is:
I don't know if Delphi 7 already had it but you can use TEdit in combination with TUpDown and then set the Association property of the TUpDown to your TEdit.
TSpinEdit is a custom VCL control. There is no Windows control with that functionality. Even in the latest version of Delphi it looks exactly the same as in Delphi 7. And it's really rather ugly isn't it?
The control, in modern Delphi, is implemented in a unit named Vcl.Samples.Spin. Looking at the documentation for the Vcl.Samples namespace we have:
Contains the units for several sample VCL components delivered with RAD Studio - a calendar, an outline, a gauge, and a spinbutton.
The unit will be named differently in Delphi 7, but the principle is the same. These are sample controls, supplied with source code.
So, what you may do is take a copy of the TSpinEdit code, and modify the painting. Change the button drawing to be how you wish it to be.
Here is the screenshot of the Adobe Encore program.
Here you can see the set of the darkish components.
Can such be bought, downloaded, etc? Are they made public from Adobe Cor.?
Thanks
The easiest way to achieve that look and feel is either:
To purchase a skin engine or component library that has skins enabled, if you must use an old version of Delphi prior to XE2.
But the preferred method is to just use the VCL skins library that comes in Delphi XE2, called VCL Styles. Unfortunately it has bugs, but so do all the other skin libraries. You can also achieve similar results in Delphi XE2 using the Firemonkey framework, which like whatever non-delphi technology is used in Adobe products, eschews native controls for a completely self-contained environment that can look any way you want it to.
If you want funky/pretty user interfaces, personally, I recommend you get Delphi XE2. If you insist on "try/buy/component" then I suggest you look into the Developer Express component suite, or one of the ones listed in this question such as VCLSkin.