The Ccontrolbasefont class is the base class for all controls in duivision that support literal attributes.
The list of properties for this control is as follows:
| Property name |
type |
Description |
| title |
string |
control display title |
| font |
font |
control Font, you can refer to a font defined in the resource definition, the default font is |
| fontname |
string |
Specify a font directly |
| Fontwidth |
number |
Specify font width directly |
| Height |
number |
control height |
| valign |
Enumeration |
Text vertical alignment mode, top, middle, bottom |
| Align |
enumeration |
Text horizontal alignment mode, left, center, right |
| skins |
skin |
Control skin name, referencing unified skin definition in resource definition |
A picture of the
| image |
picture |
control is defined in 3 ways: 1, picture file: Xxx.png,xxx.jpg, etc., is the path of the relative EXE 2, Picture resources: If the image is not a file format, Think is the resource ID, to the embedded resources of the program to find the corresponding picture resources 3, Skin way: skin:xxxx, if it is skin: start, it is considered to be the cutaneous format, followed by the skin name, to the global skin definition to find a specific picture |
| Img-count |
Number |
defines the number of slices of a picture, and if a picture file contains multiple, equal-width, small images horizontally, according to this definition, the control can know exactly how many small images are in the picture and correctly slice by the number of images |
Common functions:
| function |
whether the virtual function |
Description |
| Settitle |
Whether |
Set Caption text |
| GetTitle |
Is |
Get title text |
| Setalignment |
Is |
To set the horizontal alignment of a control |
| Setvalignment |
Is |
To set the vertical alignment of a control |
| SetImage |
Whether |
Set the picture of the control, generally a picture is divided by the horizontal direction of multiple small images of the same size, small pictures in order to indicate the normal, mouse movement, mouse state, the disabled state corresponding to the picture, each control corresponding to the number of small pictures may be different |
| Setbitmapcount |
Whether |
Sets the number of small pictures in the horizontal direction of the control picture |
Duivision Open Source Code (GitHub): https://github.com/blueantst/DuiVision
Blue Ant Studio homepage: http://www.blueantstudio.net
Duivision QQ Group: 325880743
Public number: Blueantstudio or search blue Ant Studios
Duivision Development Tutorial (-DUI) Basic class of text control