DuiVision development tutorial (17)-dialog box, duivision17

Source: Internet
Author: User
Tags set background

DuiVision development tutorial (17)-dialog box, duivision17

The DuiVision dialog box class is CDlgBase.
If you need to create a dialog box in the code, we generally recommend that you use the functions related to the dialog box encapsulated in the DuiSystem class, including the create dialog box, delete dialog box, get the pointer of the dialog box according to the dialog box name, and display the Common Dialog Box.
The properties of the dialog box are as follows:

Attribute name Type Description
Width Number Window width
Height Number Window height
Resize 0 | 1 1 indicates that the window size can be changed.
Frame String The frame layer image of the window. The frame layer is an optional translucent Alpha image layer. Generally, this image is used for Alpha mixing with the background image, each pixel in an image of this layer contains its own color and transparency attributes. The transparency attribute allows the background image to be translucent. By default, only the frame layer image is set in the main window, in addition, the default frame image is a PNG image with a gradient of transparency. It is completely opaque from the top 100% to the end.
Framesize Number The Border width of the frame layer image of the window. It is valid in non-square format.
Width-lt Number The position in the upper left corner of the frame layer image of the window is the width of the border.
Height-lt Number The position in the upper left corner of the frame layer image in the window is the height of the border.
Width-rb Number The position in the lower right corner of the frame layer image of the window is the width of the border
Height-rb Number The position in the lower right corner of the frame layer image in the window is the height of the border.
Bkimg String Specifies the background image of the window. If this parameter is specified, the specified background image is used. Otherwise, the globally set background image is used.
Crbk Color The background color of the window. If no background image is specified but the background color is specified, the specified background color is used. Otherwise, the globally set background image is used.
Appwin 0 | 1 Whether the window is displayed in the Windows taskbar. See the following description.
Translucent Number The overall transparency of the window. The value range is 1-255. 1 indicates full transparency, and indicates opacity.
Crtransparent Color Set the transparent background color of the window, in RGB format
Shadow-size Number Algorithm shadow width of the window
Img-shadow Image Image Shadow in the window
Shadow-wlt Number The width of the border between the position in the upper left corner of the image on the shadow layer of the window and the position in the upper left corner of the frame
Shadow-hlt Number The height of the border between the position in the upper-left corner of the image on the shadow layer of the window
Shadow-wrb Number The position in the lower right corner of the image on the shadow layer of the window is the width of the border.
Shadow-hrb Number The bottom right corner of the Shadow layer image of the window is the height of the border
Topmost 0 | 1 Whether the window is displayed at the beginning of all windows (within the desktop range)

Note:
1) Description of the frame layer in the nine-palace lattice mode: for complex background frame layer images, the width of all their borders is not fixed, but generally they can be split using the Nine-palace lattice mode, the background frame image is split horizontally and vertically by two lines. A total of nine parts are split. The size of the four corners is applied to the window according to the original size, the rest parts will be stretched. For this method, you only need to describe the coordinates in the upper left corner and lower right corner of the jiugong lattice, the corresponding attributes include width-lt, height-lt, width-rb, and height-rb.

2) Description of the appwin attribute: the taskbar window on the right is shown in the taskbar only when it is set to appwin attribute 1:

3) Description of window shadow: The window supports two ways of shadow: Image Shadow and algorithm shadow. An Image Shadow is a shadow image with a nine-square lattice. For a similar image, you must specify the coordinates of the Nine-square-lattice. During the window painting, the shadow image is painted as a separate layer in the peripheral area below the window. Algorithm shadow directly draws a shadow layer using the algorithm. You must specify the width of the shadow. If an image shadow is set in the window properties, the shadow layer is first painted using the image shadow method. If no shadow image is specified, but the shadow width is set, the algorithm shadow method is used to draw the shadow layer. If neither the image nor the shadow width is specified, the shadow layer is not used.

The effect of a shadow window is as follows:

Common functions of CDlgBase are as follows:

Function Virtual function? Description
SetXmlFile No Set the xml file loaded in the dialog box
GetControl No Obtain the corresponding control pointer Based on the ID or name.
DoOK No Confirmation of dialog box
DoCancel No Cancel dialog box
DoClose No Close the dialog box
SetControlVisible Yes Sets the visibility of a specified control.
SetControlDisable Yes Sets whether the specified control is disabled.
OpenDlgPopup No Open a dialog box
CloseDlgPopup No Close the dialog box

DuiVision open source code (github): https://github.com/blueantst/DuiVision
Ant financial studio home page: http://www.blueantstudio.net
DuiVision QQ group: 325880743
Public Account: blueantstudio or search for blue ant Studio

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.