Adding Skin Support for Project
Add main components
- Add TbsBusinessSkinForm and TbsSkinData components in form.
- Add TbsCompressedStoredSkin or TbsCompressedSkinList components if you want use store skins in *.exe file.
- Set TbsBusinessSkinForm.SkinData property.
- Set TbsSkinData.CompressedStoredSkin or TbsSkinData.SkinList properties.
- Load skins to TbsCompressedStoredSkin or TbsCompressedSkinList component.
- Set TbsBusinessSkinForm.BorderIcons.
- Set TbsBusinessSkinForm.ShowIcon property.
- If you use TbsCompressedSkinList component then set SkinData.SkinInxdex property.
Add custom button in form caption
- Open skin with SkinBuilder and add your 'stdbutton' or 'animate' object ("command" property set to "cmdefault").
- Use TbsBusinessSkinForm.OnActivateCustomObject event to activate your object:
Example: procedure TForm1.bsBusinessSkinForm1ActivateCustomObject(IDName: String;
var ObjectVisible: Boolean);
begin
if IDName = 'custombutton' then ObjectVisible := True;
end;
- Use TbsBusinessSkinForm.OnMouseUpEvent[OnMouseDownEvent] property:
procedure TForm1.bsBusinessSkinForm1MouseUpEvent(IDName: String; X,
Y: Integer; ObjectRect: TRect; Button: TMouseButton);
begin
if IDName = 'custombutton' then ....
end;
Add skin menus
- Add TbsSkinMainMenu component, set items and set TForm.Menu = nil.
- Add TbsSkinMainMenuBar component.
- Set TbsSkinMainMenuBar.BusinessSkinForm property.
- Set TbsBusinessSkinForm.MainMenuBar property.
- Set TbsSkinMainMenuBar.MainMenu property.
- Add TbsSkinPopupMenu components.
- Set SkinData property of components.
- [ Set TbsBusinessSkinForm.MenusSkinData property. (if menus must have another skindata) ]
Add MDITabsBar
- Add TbsSkinMDITabsBar component.
- Set TbsSkinBusinessSkin.MDITabsBar property.
Add skin hints
- Add TbsSkinHint component.
- Set TbsSkinHint.SkinData.
- Set Active = True.
- Show skin-objects hints (hints of buttons in form caption):
- set TbsSkinBusinessSkinForm.SkinHint property; - set TbsSkinBusinessSkinForm.ShowObjectHints = True.
Add TrayIcon support
- Add TbsSkinTrayIcon
- Set TbsBusinessSkinForm.TrayIcon property.
- Add biMinimizeToTray value to TbsBusinessSkinForm.BorderIcons.
Add Controls
- Add controls to form.
- Set SkinDataName property. This property can include list of values.
- Set SkinData property.
- Set UseSkinFont property. (Set this property to false if you want use your font (DefaultFont property) in control).
- Set UseSkinSize property (In some controls you must set this property to false to get control with anysize).
- [Set DefaultWidth and DefaultHeight properties if you use default mode without skin].
Add statusbar
- Add TbsSkinStatusBar control
- Call context menu and choose "panel" or "gauge" controls.
- Add other controls.
Add toolbar
- Add TbsSkinToolBar controls and set SkinDataName property to 'resizetoolpanel', 'toolpanel', 'bigtoopanel', 'panel'
- Call context menu and choose buttons.
[Add TbsSkinSpeedButton or TbsSkinMenuSpeedButton to TbsSkinPanel and set SkinDataName properties to 'resizetoolbutton',
'resizebutton or ''toolbutton' or 'bigtoolbutton' or 'toolmenubutton' or 'bigtoolmenubutton' or 'toolmenutrackbutton',
'bigtoolmenutrackbutton'.]
- Add other controls.
Set TbsSkinToolBar.SkinDataName to 'panel' or 'resizetoolpanel' and buttons.SkinDataName to 'resizebutton' or 'resizetoolbutton' if you want to create toolbar and buttons with your size.
Add TbsSkinMemo, TbsSkinGrid, TbsSkinListView, TbsSkinTreeView, TbsSkinScrollBox.
This controls use external scrollbars.
- Add control.
- Add TbsSkinScrollBar control and set kind to skHorizontal.
- Add TbsSkinScrollBar control and set kind to skVertical.
- Set Control.HScrollBar and Conrol.VScrollbar properties.
ScrollBar hide or show automatically.
» |