Duivision Development Tutorial (-DUI) Basic class of text control

Source: Internet
Author: User

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:

A picture of the
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
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

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.