I created a new style in the Bitmap Style Designer, saved it in the Styles folder, but I can't see it in the project options under the Appearances tab. What's wrong?
If you use an Embarcadero supplyed style as basis, you need to change Author and Name fields in the designers Inspector window.
Then your style will be listed in Project Options - Appearance under an own divider line:
Related
there. I changed style of standard objects with VCl-theme.
I use Color, Font and Gutter properties to change style of SynMemo. But I don't know, how change style of ScrollBar of SynEdit( apply vcl-theme ). Who can help me ?
To add styling support for the TSynEdit you must register a style hook for such control. Try using the TScrollingStyleHook style hook.
Like so
TStyleManager.Engine.RegisterStyleHook(TCustomSynEdit, TScrollingStyleHook);
Are there special steps for styling a button using stylebook in FMX? because whenever I change my style it works in the viewer only, however when I run the program nothing changes although stylebook setting are properly connected to style files and to the application as well, also if I close the program and start it again I find the same style saved and exists in the view but when run the application I cant find any style, can anyone tell me the exact steps? because I check tutorials, docs, help but still stylebook wont apply the new changes to the app at run time. Thanks.
Screenshot
To modify the default style:
Start with a blank fmx form and add a TButton.
Right-Click on the button and select Edit Default Style ... - the Style Designer opens
In the Structure pane select Buttonstyle - text
In the Object Inspector change the NormalColor property to Crimson. The text of the button changes to Crimson (red) color.
Hit the designer view Close button (X) and confirm to Apply changes ... by clicling Yes when prompted. Note that a Stylebook has been added to the form.
Build and run
The result looks like this on Windows 7
Maybe you have omitted step 5 (just guessing)
With an existing stylebook and style do as follows:
Start with a blank fmx form and add a TButton.
Add a TStyleBook, set its UseStyleManager property, double-click it and load an existing style (e.g. Air)
In the structure pane select buttonstyle - text. Note that available properties are not necessarily the same as when editing the default style.
In the Object Inspector change the Font - FontColor property to Yellow. The text of the button changes to yellow color.
Hit the designer view Close button (X) and confirm to Apply changes ... by clicling Yes when prompted.
Build and run
The result looks like this on Windows 7
I've created a style with the Bitmap Style Designer for Delphi XE7.
I've updated the button style to white with a blue border and duplicated it to create an orange button called Button_Copy.
I've exported the style to FireMonkey, but I can't find Button_Copy to assign it to a button on my form. How do I do this?
Also, can I rename Button_Copy to e.g. OrangeButton?
In the Bitmap Style Designer, save the style as a FireMonkey style.
Add a TStyleBook to your form.
Set the StyleBook property to the stylebook.
Double-Click the StyleBook and open your style. Close and Apply.
You can now set the StyleLookup property of a button to Button_Copy and if all is well you will see your new style.
Note that your new style won't appear in the selection list for StyleLookup - the list of available values appears to be hard coded.
And, of course you can change the name - just change the StyleName property of the top level object (probably a TLayout). The normalnaming convention is to append the word 'style', e.g. OrangeButtonStyle.
I'm attempting to create an application menu and toolbar in Delphi XE3 that looks like the following (from a program I have):
I'm able to replicate a portion of this look by doing the following:
Create a new VCL Forms application
Add a TMainMenu and insert template menus for File/Edit/etc.
Add a TCoolBar to the form
Add a TToolBar to the TCoolBar
Add a TToolButton to the TToolBar for each of File/Edit/etc. and choose the Group property
Delete the Menu property from the form (so no program menu shows)
Assign the MenuItem property for each TToolButton to the corresponding File/Edit/etc.
Add a second TToolBar to the TCoolBar beneath the first one
Here's what it looks like:
It's somewhat similar but is still missing all the style elements to modify the look of the new application menu.
My question is, does anyone know of how to achieve a similar look, perhaps with a third-party component library? It seems likely that the original developer used a third-party VCL library. I'd like the drop shadow in addition to the styled menus and TCoolBar.
I've tried Raize Components, TMS Advanced Toolbars & Menus, and am in the process of trying DevExpress VCL components. None of them seem to provide a solution, but perhaps I'm not familiar enough with them yet to figure it out.
Delphi has come with an ActionBands demo that can show you how to obtain this appearance "out of the box" for your menus using TActionMainMenuBar (and TActionToolBar). Just change the Style menu to XP Style in the demo:
The rest of your steps seem pretty well complete. For the images on the menu items and toolbar buttons, see the use of ImageList components in association with the TActions on the menu and toolbar in the demo.
Is there a way to set font properties in the firemonkey style editor?
I tried both using a custom style and changing the default style of a TButton.
Each of these layouts have a child TText component which is named text. If I try to change the font settings (e.g. change the bold flag) it looks okay in the designer, but in the form designer as well as at runtime, nothing changes.
Is there also a way to define a default font for all TTextControls? In vcl there is a parentfont property which is not available in Firemonkey. After a closer look to the components code, I think it should be possible by defining the text layout for a TTextControl in the stylebook. But this component is not registered in the component palette.
Update: TMenuItem does not apply font settings at all. At the moment it can only be done at runtime.
This was fixed in XE 2 Update Pack 1. Try downloading the new version. You can now set Font styles.