Set the width and height of the control/dialog box

Source: Internet
Author: User

Set the width and height of the space in VC: (unit: px)

 

1. Set the control/dialog box to a fixed size (specified width and height)

Method 1: In the control/dialog box properties, specify the specified Size for Width and Hieght In the Size attribute;

Method 2: Set the label Autosize to True, and then specify the Size of the control/dialog box;

Maximumsize and MinimumSize are set to (0, 0 );

 

Eg: this-> label-> AutoSize = true;

This-> label1-> Size = System: Drawing: Size (100, 20); // set the width of the control to 100 and the height to 20.

 

2. Set the width and height to automatic.

A. Set the label Autosize to True; www.2cto.com

B. Set maximumsize in the control property to (); // set the width to 0, indicating the automatic size and the height to 30.

C. Set MinimumSize in the control property to (0, 30 );

 

 


Author: S_52588

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.