Tip of the day
Storing of custom glyphs in a skin for using them in ImageList after a skin loading.
The ASkinEditor tool can pack custom users glyphs into the skin (*.asz file). After activating this skin, glyphs may be loaded in the ImageList for futher using in buttons, menus, etc. This feature may be used for showing of different set of glyphs for different skins.
For packing of users glyphs into a skin these glyphs must be named as ‘ico_*.png’ and copied into the skin sources directory. When skin will ne saved in the ASkinEditor, then all such ‘ico_*.png’ files will be saved in the skin too.
When skin is activated at the run-time, all stored glyphs may be loaded to the TsAlphaImageList component in the TsSkinManager.OnBeforeChange event. The working demo with sources of using such feature may be downloaded here .
Update: AlphaControls v15.05 Beta released 21.03.2020
- Solved issue with showing of DropDown button in the TsPageControl when not skinned
- A lot of minor improvements and bugfixes
Update: AlphaControls v14.37 Stable released 09.02.2020
- Solved issue with showing of system icons in shell controls under some old Delphi versions
- Improved visibility of BoundLabels when parent controls are pasted from ClipBoard in design-time
- Improved scaling of boundlabels
- Added OnItemIndexChanged and OnItemCountChanged events in the TsListBox component
- Minor improvements and bugfixes
New skin: SketchPad
New skin: Fluent White
New skin: Fluent Night
New demo app: AMegaDemo
New in the AlphaControls 2019 (version 14)
A scaling-engine has been rewritten completely. Improved internal structure of skins, added support of per monitor scaling under Window 10. «DPI Awareness» mode from latests RAD Studio was supported. New «smVCL» and «smCustomPPI» parameters has been added in the TsSkinManager.Options.ScaleMode property.
Several ways exists for scaling of applications with AlphaControls package:
1. Mode of compatibility with «DPI Awareness» option in latests RAD Studio. Use the «smVCL» parameter in the Options.ScaleMode property of the TsSkinManager component for enabling.
New skin: Blue Shadows
New in the AlphaControls 2018 (version 13)
The ImageList component where chars from fonts used as source for glyphs.
This component may be used as usual ImageList component for showing of glyphs in buttons, menus and any other elements of the application.
Custom font may be embedded into this component by few clicks of mouse and may be used as source of glyphs on other machines.
The TsCharImageList component has the popular symbol font embedded as default (‘FontAwesome’ font license). This font is free, has more than 700 icons and may be used as source of icons in all projects where the TsCharImageList component is available.
Each glyph may have own custom color. Otherwise (if color is clNone) glyph will have a current color of text in the drawn element. Glyph color may be customized with using of special properties like GlyphColorTone in buttons, or AddedGlyph.ColorTone in all edit controls.
New skin: Material Paper
New in the AlphaControls 2017 (version 12)
This component is a collection of buttons which may be placed in any place of form, including borders and title area. Buttons are placed over all other controls. They may be painted with using of current skin sections, standard Windows theme or custom images.
New skin: Jeans
New in the AlphaControls 2016 (version 11)
Support of forms scaling (automatic and manual).
In the TsSkinManager component the Options.ScaleMode property has been added with sm100, sm125, sm150, smAuto and smOldMode values. Default smOldMode value added for a backward compatibility. Application will have an old behaviour with this option, SkinManager will not have influence to the scaling of windows and glyphs.
sm100, sm125 and sm150 options allows to specify a scaling value manually, (100:100, 125:100 and 150:100 accordingly).
New skin: Notes Plastic
New tutorial: New in the AlphaControls 2015 (version 10)
Removed all code which was marked in v9 as «deprecated».
Improved animation in all «glowing» effects.
Deprecated TsHintManager component has been removed. It’s recommended to use the TsAlphaHints component instead. .
New tutorial: Using of skins, protected by keys
The possibility of AlphaSkins encryption has been added in the AlphaControls v10. Such skin can’t be unpacked and message about unregistered skin is shown when it loaded in the application. The message about unregistered skin will not be shown if special secure key contained in the .
Nonuniversal personal skins
New skin: Notes Leather
Update: Released AlphaControls 2014 (version 9 Beta) 28.02.2014
- Most code has been rewritten, raised speed of rendering.
- Controls can have outer effects, like shadows and others, look of effect defined in a skin.
- Scrolls may have different sizes, arrow buttons can have different sizes too and may be invisible.
New tutorial: Non-standard possibilities of components in the package
Properties common for all components
This property is available in all edit controls (TsComboBox, TsMaskEdit, TsSpinEdit and others). The property allows to add a label which will be near the edit control always and moved automatically together with this control. Options which are available in this property:
- Active — creates a label for the control
- Caption — text of the label
- Font — specifies a font of the label. Change the UseSkinColor property to True if custom font color should be used.
- Indent — space between a label and an owner control
- Layout — specifies a position of a label
- MaxWidth — maximum width of a text block (text is wrapped automatically if width is bigger than MaxWidth)
- UseSkincolor specifies that color of text should be receive from current skin. Otherwise, the Font.color property will be used.
The property is available in buttons from the package and in the TsCheckBox, TsRadioButton and TsTrackBar. Property defines events when will be used animation of component. Each button have own animation options. Animated control changing may be occured in four mouse events(mouse entering and leaving, left button down and up). If aeGlobalDef is enabled then will be used global animation options from TsSkinManager.AnimEffects.Buttons.Event property. In this case we can control behaviour of animation effects for all buttons from one point.
This property is available in buttons, edit controls and many other components. Defines looking of the disabled control. Available options:
- dkBlended — if True then control is drawn alphablended. Blend value , used by definition, is equal to 0.4 and declared in the sDefaults.pas file
- dkGrayed — if True then control is drawn with changed saturation. Saturation value DefDisabledGrayed>, used by definition, is equal to -90 and declared in the sDefaults.pas file
This property is available in most visible controls and allows to change a skin options in separate control. Available options:
- CustomColor — ensures that a control is drawn with account of the standard Color property value
- CustomFont — ensures that a control is drawn with account of the standard Font property definitions
- SkinManager — specifies the TsSkinManager component which will be used for skinning of the component
- SkinSection — contains a skin section name for this control. SkinSection allows to change a looking of the control by using of defined section from skin.
Some components (buttons, for sample) have HUEOffset and Saturation options in the SkinData property. These options allows to change color tones in separate control.
The SkinData.Invalidate procedure completely repaint skinned control (standard Invalidate procedure can work not always because sometimes a control image is in the skin cache and this cache image should be updated too).
SkinData.BeginUpdate and SkinData.EndUpdate procedures forbids and allows a control repainting accordingly.
New tutorial: Additional features in menus
New tutorial: Adding skins to existing project
Two main ways exists for adding skins:
- Using of standard components, controlled by the TsSkinManager component
- Replacement of standard controls by analogs from the AlphaControls package
1. Using of standard components
This way is more easier in most cases and allows to see a result after few minutes of work. Therefore, we first consider it. For a sample will be used an existing demo-program from Demos directory in BDS2005. Sources of this demo may be downloaded there.
After first compiling of this project we will receive a window where form and all controls have standard looking.
New tutorial: Skins creation. General information
Only unpacked AlphaSkins may be loaded to the skin editor. For unpacking and loading of packed skin (*.asz) use the «Unpack and open» button in the ASkinEditor.exe. All skins in unpacked state contains two main files :
So, for a new skin creation needed .
New tutorial: TsAlphaHints component
Controls a drawing of tooltips in the application with or without skins. To get this component working, it is enough to place him to the main form of application. He has one basic style already, this style is configured and used as default. That’s all! Hints will be drawn automatically now while the Active property is True.
A variety of styles may be made by changing of component settings. For managing styles there is a special design-time editor of the Templates property.
Unlike TsHintManager component, the TsAlphaHints manager can draw hints with any shape. TsHintManager is obsolete and remains in the package for compatibility. Component TsAlphaHints more promising and preferable to use.
Thanks to the TsAlphaHints tips may have a text formatting using Html tags, can display images and graphs. Animated hints may be produced also. Example of use can be seen in this demo .
The component can apply user defined styles, and can use styles defined in the current skin, if it is active. The UseSkinData property should be enabled for using of styles from skin. Each skin has the ‘HINT’ section, where defined a data which used for drawing.
New tutorial: TsAlphaImageList and TsVirtualImageList
This component is an analogue of standard TImageList component, but there are some significant differences:
- Changing of Height and Width properties without loss of icons.
- It’s possible to use this component as a storage of images with different sizes.
- Allowed formats of icons: Ico, Png and Bmp 32bpp.
- Images are embedded in executable file in the original format (with compression).
- Support of the NumGlyphs property of buttons.
New tutorial: TsSkinProvider component
This component manages skinning of each separate form where he is placed. Despite the fact that it is created automatically (if TsSkinManager.SkinningRules.srStdForms is True), it is recommended to put this component on the form in design-time. This contributes to better controlling of the form, improves an animation of forms showing and many other operations. Also, this component contains many additional settings that help to influence the best skinning of the form on .
New tutorial: TsSkinManager component
Component is designed for centralized management of program skinning process. For work of this component is enough to define a skin and set the Active property to True.
There are two ways of skins deploying with the application .
New tutorial: Standard and third-party components
To allow a support of 3rd-party or standard control within your project, the control must be declared in the SkinManager.ThirdParty property. Use a special design-time editor for a handy adding of required controls.
List of currently supported components (increases .
New tutorial: Important stuff
Here are a several simple tips, the implementation of which can significantly improve the behavior of the skinned application:
New tutorial: First application with AlphaSkins
How to use AlphaSkins properly? Consider the simplest example :
1. Create a new application
2. Put the TsSkinManager component on the form, let’s call him as sSkinManager1
3. Add at least one skin to .
New tutorial: Installing questions and issues
New tutorial: Installing the Alphacontrols package
If you have a previous version of the package already installed, you should remove it using the following method.
- Open the «Component/Install packages» menu item in Delphi/C++ Builder and remove Alpha packages there