Simple and c#2008 from getting started to improving step by step (v) Common control classes for Windows applications (9)-label

Source: Internet
Author: User
authorPeterxu Source: Blog.csdn blog:http://blog.csdn.net/peterreg/
Copyright Notice: Original works, allow reprint, reprint, please be sure to hyperlink form to indicate the original publication of the article, the author information and this statement, otherwise will be held accountable. This article address: http://blog.csdn.net/peterreg/archive/2008/04.aspx

After my last article, "Windows Application common control class (8)-combobox", let's analyze the Control class label used in it.

1. Introduction
The Label class represents the text label for a control and provides support for access keys.
Namespace System.Windows.Forms
Assembly System.Windows.Forms (System.Windows.Forms.dll)
The base class control implements the basic functionality common to button controls.

2. Common Properties
AutoSize Gets or sets a value that indicates whether the control is automatically resized to display its contents in its entirety.
BorderStyle Gets or sets the border style of the control. (enum BorderStyle)
None No Border
FixedSingle Single-line Border
Fixed3D three-dimensional border
Text associated with the control.

3. Notes
A label control is typically used to provide descriptive text to the user.
Usually labels and text boxes are used together. The label provides the user with a description of the type of data entered in the text box.
The label control is always read-only and the user cannot modify the string value of the Text property. However, you can modify the Text property in your code.
The UseMnemonic property allows the user to enable access key functionality. In the Text property, when you precede a character with a macro symbol &, the letter in the label control is underlined. Pressing the ALT key and the underlined letter moves the focus to the next control in the tab order. If the Text property contains a macro symbol, the second macro symbol should be added, and the following letter will not be underlined.

trackback:http://tb.blog.csdn.net/trackback.aspx?postid=2287906
 

Related Article

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.