Vclskin question and answer

zhaozj2021-02-16  41

Vclskin question and answer

Translation: nxyc_twz@163.com

1 Do you need to place this component in each form of a project (with 14 forms)?

No, you only need to place a TSKINDATA component on your main form, and vclskin can automatically replace the appearance of all forms in your project.

2 How to SKIN embedded form?

Vclskin cannot automatically replace the appearance of the embedded form, you need to manually implement it. There is an example of a 'NestedForm' in the demo package demonstrate the appearance of the in-line form and framework at runtime.

3 How to skin dynamic controls?

You need to manually implement it. For example, the following code:

Control: = TMYCONTROL.CREATE (Form1); Skindata1.UpdateskIntrol (Form1);

4 How to SKIN can stop the form?

Vclskin supports a deactivated form. The example code is as follows:

Procedure TdockableForm.FormShow (Sender: TOBJECT); Beginif Mainform.skindata1.active dam.skindata1.skinform (Handle);

5 How to Skin state pop-up menu?

The example code is as follows:

Popup: = tpopupMenu.create (form1); ..... add menuiteskindata1.updateMenu (form1); // Add this line Popup.Popup (x, y);

6 How to SKIN Dynamic Form?

Vclskin can SKIN dynamic form, but it cannot automatically SKIN embedded form.

7 Can't find file 'c: / program files / borland / delphi7 / sm / winskindata.pas'

Delphi 7 preview version of DCU file format is different from the Delphi 7 official version.

If you use the Delphi7 official version, you can install the presentation package vclskin2.zip. If you use the Delphi7 preview, you should install the demo package D7TRIAL.ZIP.

8 When using FastReport, a prompt: Invalid action 'control does not have a parent window?

Set tskindata.skincontrols.xcfastreport = true to solve this problem.

9 Access color in the Skin file

You can access Skin color through tskindata.colors []. 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;

10 Users can define the appearance of visual components?

You can use Skinbuilder to modify or create a SKIN file.

转载请注明原文地址:https://www.9cbs.com/read-26403.html

New Post(0)