NO WAR IN
UKRAINE!
Home
Products
Skins gallery
Tutorials
Buy
Downloads
Demo-apps
Updates history
Feedback
Customers
Partners
Forum
Sign up for news
Windows 11
Compatible
|
TsSkinManagerThe component is designed for centralized management of program skinning process. For work of this component is enough to define a used skin and set the Active property to True. There are two ways of skins deploying with the application: ¹1. Adding skins into the InternalSkins list, we call them as "internal" skins. In this case, you should add them to the InternalSkins list, using a special design-time property editor. Skin is applied to the application after selection of his name in the SkinName property. All skins contained in the InternalSkins list will be included in the Exe-file automatically. ¹2. Deploying of skins as separate files, we will call them as "external". Usually they are placed in a separate folder which will be deployed with application. Skin is applied to the application, if directory with external skin is specified in the SkinDirectory property, and his name is defined in the SkinName property. These two ways may be combined. If external skin is not found or not accessible, then first internal skin will be loaded automatically in this case. Component is active only when the Active property is enabled. Please, note - if a loading of skin fails (for example, if the skin is not selected), then Active property is changed to False automatically and program will have a standard look. The AnimEffects structure contains a set of animation settings for different events:
Before running of animation effect the image in memory is created (prerendering). This feature may be useful even if animation is not used. For example, if a form contains a lot of controls and showing of this form is slow, you can set the animation time to 0, Active to True. Then the whole image will be produced in the memory, and the form will appear almost instantly. The FormShow animation will work better if the TsSkinProvider component is placed on the form in design-time. The Brightness property allows to changes a brightness of whole application in the run-time. The ButtonsOptions structure contains settings for all buttons in whole application:
The CommonSections property allows add new sections to the skin in real-time. If new section is defined in this property, then this section will be automatically added to each applied skin. For example, we need a white panel in the each applied skin, but borders should be inherited from the "PANEL" section of this skin. Then we should open CommonSections and add such section there:
[PANEL_WHITE]
PARENTCLASS=PANEL
GRADIENTPERCENT=0
IMAGEPERCENT=0
COLOR=16777215
Now it is sufficient in the panel or in other control to change the SkinData.SkinSection property to "PANEL_WHITE" and component will have a new look. Example of the CommonStyle property using may be downloaded there. Effects contains properties which controls a set of special effects that are available in the skin:
The ExtendedBorders enables a using of extra borders in forms and dialogs of application. Usually these additional borders are used for adding of shadows to forms, but they can implement and other effects also. The Fonts property allows to control a used font in whole application from one point. HUEOffset specifies an offset of color palette in whole skin. Some skins are configured with forbidding of title icons colors changing. InternalSkins contains skins, embedded in the Exe-file. Adding skins produced in the design-time with using a special dialog. Number of skins which may be embedded in Exe, is not limited, but a large number of built-in skins can greatly increase a size of executable file. The "Update all" button allow to update all internal skins in design-time by a single click. A source directory with newer versions of skins is shown as "External location" in the upper left corner of the dialog. The IsDefault property determines a skin manager which will be default for all application (DefaultManager). If application has defined several skin managers, then DefaultManager will be used for skinning of dialogs, as well as for all forms and controls which do not have a manager specially defined in the SkinData.SkinManager property. DefaultManager always the first to be created, or the first created by the manager will be a key. Purpose of the Keylist property is storing of keys for using of encoded skins. The ASkinEditor tool allow to encode any skin with a special unpacking key. If such skin used in the application without key, then user will see a message that used non-registered skin. Also, such skin, can't be unpacked and changed in the ASkinEditor tool by third persons. The LabelsOptions property allows to control a behavior of labels in whole application from one point. The MenuSupport structure allow to control a process of the popup menus skinning.
The Options structure contains a set of common parameters which allows to change a behaviour of the skin engine in whole application.
Saturation - changes saturation of the current skin for the whole application. The ScrollsOptions allows to change dimensions and behavior of scrollbars in whole application.
SkinDirectory - directory where component should look for external skins. If used embedded skins only, this property may be not defined. SkinInfo stores information about the active skin. SkinName specifies a skin which should be activated. Name of skin should be specified without a file extension. SkinnedPopups disables a skinning of menus. If this property is False, then menus will be drawn by windows system. SkinningRules contains some rules of the application skinning.
SkinsFilter adds filtering of accessible skins to the component. This property may be usefull for such components as TsSkinSelector. List of available skins will be filtered there. If `sfiInternal` is enabled then internal skins are accessible for choosing. If `sfiExternal` is enabled then external skins (in *.asz files) are accessible for choosing. The ThirdParty list contains rules of a skin applying for standard and third-party controls. Skinning of standard and third-party controls works only when SkinningRules.srThirdParty is True è and form is skinned (it is desirable to place the TsSkinProvider component on this form in design). A special property-editor used for a changing of this list in design-time. At the left is a list of types which should be skinned. It's possible to add all items manually by using of bottom toolbar. But may be used a special lists with predefined sets of components, which is on the right. Please note, that names of types are case-sensitive there. The Version property stores the current version of the package. The Palette array doesn't exists in the Object inspector, but accessible at the run-time. This array contains all common colors of the loaded skin, which may be changed by developer. Available indexes for this array:
TacPaletteColors = (pcMainColor, pcLabelText, pcWebText, pcWebTextHot, pcEditText, pcEditBG,
pcSelectionBG, pcSelectionText, pcSelectionBG_Focused, pcSelectionText_Focused,
pcEditBG_Inverted, pcEditText_Inverted, pcEditBG_OddRow, pcEditBG_EvenRow,
pcEditText_Ok, pcEditText_Warning, pcEditText_Alert, pcEditText_Caution, pcEditText_Bypassed,
pcEditBG_Ok, pcEditBG_Warning, pcEditBG_Alert, pcEditBG_Caution, pcEditBG_Bypassed,
pcEditText_Highlight1, pcEditText_Highlight2, pcEditText_Highlight3,
// Round buttons colors
pcBtnColor1Active, pcBtnColor2Active, pcBtnBorderActive, pcBtnFontActive,
pcBtnColor1Normal, pcBtnColor2Normal, pcBtnBorderNormal, pcBtnFontNormal,
pcBtnColor1Pressed, pcBtnColor2Pressed, pcBtnBorderPressed, pcBtnFontPressed,
pcBorder, pcGrid, pcHintBG, pcHintText);
EventsOnActivate occurs immediately after a component activation. OnAfterChange occurs after changing of the current skin. OnBeforeChange occurs before changing of the current skin. OnDeactivate occurs after a skins deactivation. OnFontChanged event occurs when the MainFont property is changed. OnGetMenuExtraLine called before a drawing of the popup menu, if MenuSupport.UseExtraLine property is active. Additional left vertical line will be drawn if LineVisible parameter is True. FirstItem parameter points to the first menu item for this popup menu. Focusing on this option you can enable or disable the extra line, also may be defined such parameters as SkinSection, Caption, and Glyph. Example of handling of this event may be found in ASkinDemo and ASLDemo. The OnGetPopupItemData event occurs before a drawing of popup menu and allow to define a font for an each menu item. OnScaleChanged event occurs after changing of the application scaling. OnScaleModeChange event occurs after changing of mode of application scaling (Options.ScaleMode property). OnSkinChanging the event occurs before changing of skin and allows to cancel this changing. OnSkinListChanged occurs when a list of internal skins is changed and when SkinDirectory property is changed. OnSkinLoading occurs after a skin activation immediately. OnSysDlgInit occurs when a system dialog is opened, and contains such parameters as window Handle and AllowSkinning. The event allows to disable a skinning of custom dialog. |
Installing, using and licensing the demo programs
© Sergii Goncharov, Ukraine, Odessa 2004-2023
|