Delphi Vclskin Use Tutorial

Source: Internet
Author: User

1. TskindataTskindata is mainly used to beautify your program, so long as the Tskindata control is put down, it can automatically beautify all forms. PropertiesActive: Use or cancel the beautification of the program.Disabletag: Cancels the beautification of a particular component; Set the Tag property of the component to 99 on the line.
(Control.Tag mod 100=disabletag)Skincontrols:Specifies which type of component can be beautified.Skinfile:  The file name of a skin (skin) file that contains the path, which is loaded at run time.Skinstore: A skin file that is stored in design mode.Skinformtype:can use a variety of landscaping methods. MethodLoadfromstream (Stream:tstream);
LoadFromFile (value:string);
Loadfromcollection (Astore:tskinstore;aindex:integer);Loads the skin file at run time.Updateskincontrol (Fparent:tform);
Updatemenu (fparent:tform);Beautify when the component is created at run time. EventsOnformskin (sender:tobject;aname:string; Var Doskin:boolean);The Onformskin event occurs before the beautification form, and if Doskin is true, Vclskin will beautify the form, and if it is False,vclskin, it will be skipped. AName is the class name of the form.onskinchangned (sender:tobject);Onskinchanged occurs after the skin file changes. 2. TskinstoreTskinstore allows you to store multiple skin files in design mode. Tskindata can load skin files from Tskinstore at run time:tskindata.loadfromcollection (Astore:tskinstore;aindex:integer), 3. How to beautify the program interfaceYou can build a beautiful program within minutes. 1 Place the Tskindata control on the main form. 2set the Skindata.skinstore property to store the skin file in your program. 3 Setting skindata.active = True 4 Compile and run your program. 4. Vclskin FAQ 1 If I have 14 forms in my project, do I put a skin control on each form?No, you just need to place a tskindata in your main form, and Vclskin will be able to beautify each form automatically. 2 How to beautify an embedded form?Vclskin cannot automatically beautify the inline form, you have to manually control it. There is an example of "nestedform" in the compressed package, which is about beautifying the embedded form and frame in the running state. 3 How do I beautify dynamic controls?You need to control it manually. The code is as follows:
Control:=tmycontrol.create (Form1);
Skindata1. Updateskincontrol (Form1); Add this line to the skin dynamic control.
4 How do I beautify my form?Vclskin supports docking forms. The routine code is as follows:
procedure Tdockableform.formshow (Sender:tobject);
Begin

If MainForm.skindata1.active then MainForm.skindata1.skinform (handle);

End;
5 How to beautify the dynamic right-click menu?The routine code is as follows:
Popup:=tpopupmenu.create (Form1);
.... add Menuite
Skindata1. Updatemenu (Form1); Add this line
Popup.popup (x, y);
6 How do I beautify a dynamic form?Vclskin can beautify dynamic forms, but not automatically beautify inline forms.Click here to see how to beautify the inline form. 7 file not found ' C:/Program Files/borland/delphi7/sm/winskindata.pas '
Delphi7 Trial VersionAnd Delphi7 Official EditionThe DCU file format is not the same. If you are using the official version, you can install a demo package.Vclskin2.zip.
If you are using a trial version, you can install a demo package.D7trial.zip. 8 "Invalid action occurred when using Fastreport, does the control have no error with the parent form?"Set up TSkindata.skincontrols.xcFastReport = Truecan solve this problem. 9 An invalid operation occurred using Reportbuilder, does the control not have a parent form error prompt?You can be in Tskindata.onformskinThis control is de-beautified in the event. The code is as follows:
procedure Tform1.skindata1formskin (Sender:tobject;
aname:string; var doskin:boolean);
Begin

' Tppprintpreview ' is the name of the form to be removed.
If Aname= ' Tppprintpreview ' then doskin:=false;

End;
10 How do I access the color of my skin file?You can use tskindata.colors[]property to access the color.
For example, the background color of the form is: Skindata. Colors[csbuttonface].
Tshemecolor= (Cstext,cstitletextactive,cstitletextnoactive,
Csbuttonface,csbuttontext,
Csbuttonhilight,csbuttonlight,csbuttonshadow,csbuttondkshadow,
Csselecttext,csselectbg,cshilighttext,cshilight,
CSMENUBAR,CSMENUBARTEXT,CSMENUTEXT,CSMENUBG,
csscrollbar,cstextdisable); Tshemecolors=array[cstext. Cstextdisable] of TColor; Skindata.Colors:TShemeColors;
11 can users customize the appearance of those visual controls?You can useSkin BuilderCustom details. 12 How do I de-beautify a form or control?Set up form.tag=99 CancelBeautify this form. 13 How to beautify the style of a project's form title bar and menu?Set up TSkindata.skincontrols.xcMainmenu = False.

Delphi Vclskin Use Tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.