To define the VCL styles for my application at runtime, I found the following link DELPHI VCL STYLES.
Is there also an option to set the VCL style for my appliaction during the compilation process using finalbuilder tools ?
Turns out I somehow have more than one profile on SO. Here's the screenshot
Related
I've ran into a problem with "Vista Dialogs" in "Delphi 10 Seattle" yesterday. It seems to not work well with some VCL Styles.
This bug occured while using "Windows 10 Dark" as default style in my app.
So my immediate thought was that Vista Dialogs does not work with Custom VCL Styles, but when using "Windows" as a default style and using Windows 10 as OS the dialog works fine.
I've uploaded two pictures, one with the style applied showing the visual bug and one without it, working just fine.
Without "Windows 10 Dark" VCL Style applied
With "Windows 10 Dark" VCL Style applied
I've researched about this, this error is mentioned in other posts, but this bug is not what those posts are about...
Anybody understands why this happen? and how can I fix it?
The VCL Styles version included in RAD Studio only can style the classic dialogs, If you want full support for the New Dialogs you must use the VCL Styles Utils project.
Just install the library and add these units to your project.
uses
Vcl.Styles.Utils.Menus, //Popup and Shell Menus (class #32768)
Vcl.Styles.Utils.Forms, //dialogs box (class #32770)
Vcl.Styles.Utils.StdCtrls, //buttons, static, and so on
Vcl.Styles.Utils.ComCtrls, //SysTreeView32, SysListView32
Vcl.Styles.Utils.ScreenTips, //tooltips_class32 class
Vcl.Styles.Utils.SysControls,
Vcl.Styles.Utils.SysStyleHook;
As the title says really. How can I add an FMX form to a delphi package? In the package I have a Tpanel descendant component - which is all installed fine. What I'd like to do is include a form in the package so that when I click on the panel at runtime the form pops up for example. (I don't want to use the FMX form at design time - just at runtime, so I just want to include the FMX form as in the package, the component has design time properties though)
It seems I can only add a VCL form to the package - when I right click and 'add new' to the package, it tries to add the VCL to the package - which I don't want. I want to run it on OSX.
I've found plenty of adding VCL forms e.g. Adding forms and frames to packages probably something obvious I'm missing - tia
Delphi XE6 on Windows 8/OSX target
Packages have affinity to a particular framework. Your package appears to be a VCL package. In the .dproj file you will find
<FrameworkType>VCL</FrameworkType>
Change this to
<FrameworkType>FMX</FrameworkType>
to have affinity to FireMonkey.
Although I've not done so recently, I expect that you get to make the framework affinity choice when you create the package. Presumably you chose VCL. Or the package was created before FMX existed and the project upgrade process added (correctly) the VCL framework setting.
Ever since upgrade to XE6 there seems to be a bug in the application menus when you use styles, best explained with these screenshots:
The 2nd screenshot has the "22" item Visible set to False
Delphi XE6 is using a outdated version of the VCL Styles Utils project to style the popup menus. This issue doesn't happen if the last version of the VCL Styles Utiles Project is used as replacement of the Embarcadero version. So as workaround you must download the VCL Styles Utils project from the repository, then add the units Vcl.Styles.Utils.Menus, Vcl.Styles.Utils.SysControls and Vcl.Styles.Utils.SysStyleHook to your project and finally comment or remove the Line (27) {$UNDEF UseVCLStyleUtilsMenu} in the Vcl.Styles.Utils.Menus unit.
In my programming team we all use Delphi XE2 Professional. We just figured out that on different computers different numbers of VCL styles are available.
Where do VCL styles come from? Do I have to take care to move styles from one Delphi installation to another?
Q : Where do VCL styles come from?
A : The Vcl Styles files are part of the Delphi XE2 and XE3 versions, and are installed in two locations C:\Users\Public\Public Documents\RAD Studio\<n.n>\Styles and C:\Program Files (x86)\Embarcadero\RAD Studio\<n.n>\Redist\styles\vcl folders.
Also you the Vcl Styles files can be created from the scratch or customized, so maybe some of the machines contains custom Vcl Styles and that explain the different numbers of vsf files.
Q : Do I have to take care to move styles from one Delphi installation to another?
That's depends of how the Vcl Styles are added to the Delphi project. Basically exist 3 ways of add the Vcl styles to your project.
Using the Projects->Options->Application->Appearance Menu option. In this case a new entry by each style is added to the .dproj (Delphi project file) with the path to the style. After when you compile you project the styles referenced by the .dproj file are embedded as a resource.
Loading the styles manually (from a external file or resource) using the TStyleManager class.
Editing directly the .dproj file and adding a new entry called VCL_Custom_Styles in the <PropertyGroup Condition="'$(Base)'!=''"> Key.
So if you Delphi project is referencing the Vcl styles using the method 1 or 3, you will need copy the Vcl Styles between machines to avoid compilations problems if a Vcl style is missing.
Note : As recommendation you can create a style folder (and add that folder as part of you source control scheme) in your Delphi project location and here copy the vcl styles used by you Application, and then modify your code to load the styles using the method 2.
I saw a youtube video (can't remember which one) where the user changed an option in Delphi XE2 to change the default style for an entire FireMonkey application. After much hunting I can't find the option.
IDE Insight for 'style' shows me 'Default Style - Custom Styles (Forms)' under 'Project Options'. But unless I'm being particularly thick, there's no such option there.
VCL Styles and Firemonkey Styles are fundamentally different.
Because of that I am not sure they should have used the same name.
VCL Styles
Edited through: Tools|Style Designer (External App)
Style Extension .VSF
Format is Binary
Can be set through: Project Options|Application| Appearance (Which just add TStyleManager.SetStyle('StyleName'); to your code
Runtime control of styles can occur through the TStyleManager class
Firemonkey Styles
Editor is Internal to the IDE
Accessed through TStyleBook Resource Property Editor
Can also be accessed by Right click on any visual control and selecting either
Edit Custom Style...
Edit Default Style...
Note: These two menu choices are only available in desktop apps, not mobile apps.
Once in editor you can select the Load.. button to change the style for the selected TStylebook. If the entire application is using the same TStyleBook it will change the whole application.
Style Extension .style
Format is like a DFM
Runtime control of styles can occur on each control and through the TStyleBook
On windows 7 all of the styles both VCL and Firemonkey by default are placed in the
C:\Users\Public\Documents\RAD Studio\9.0\Styles directory
One bullet point is a direct answer, but I felt like I had to give the long answer to help others.