The usage of several VCL components

Source: Internet
Author: User

ListBox

ComboBox component

Label Widget

Button VCL

BITBTN component

Speedbutton component

radio buttons and check boxes

ScrollBar component

File Open

File Save dialog box

Color dialog box

Find and replace

A wide range of components for the ListBox and ComboBox components. Represents a standard Windows list box that allows users to select options from its list of options. If there are too many items in the list box to be displayed at once, a scroll bar appears to access other items in the list box. New terms Some list boxes are the owner-drawn list boxes. In the owner-drawn list box, the programmer is responsible for drawing the items in the list box. If you want, you can generate a list box that the owner draws. The owner-drawn list box is common, but you don't necessarily realize it. Describes the custom C + + Builder toolbar, which describes the C + + Builder Toolbar Editor dialog box, which contains two list boxes, the list box on the left is a normal list box, lists the group of buttons that you can select, and the list box on the right is an owner-drawn list box. Displays a text description of the actual button and button features displayed on the toolbar. A combo box is a specialized list box. In fact, a combo box is a combination of a list box and an edit control. Users can select from the list box, or you can enter values in the Edit section. When the user selects in the list box, the item is placed in the edit control. The combo box has three different types, depending on the style property. Table 8.5 Lists the combo box types and their descriptions. Box type Item description simple simply places an edit control above the list box. Users can select in a list box, or you can enter a value Drop-down in the edit section similar to a simple style, except that the list box section is not initially displayed, but instead provides a Drop-down button that allows the user to browse the list and select options. Users can also enter a value Drop-down list in the edit section, which restricts more of the combo box. As with the Drop-down style, the list box section is not initially displayed. Users can click the Drop-down button to browse the list and select options, but they cannot enter text in the edit section. This style can only be selected in the scheduled option Figure 8.4 shows the ComboBox test program running, from which the characteristics of each combo box.

Columnslistbox contains the number of columns in the list box, so that this property is greater than 1 to generate more than one column. The default is 0ExtendedSelectionListBox to determine whether to allow extended selections. Extended Select User can use shift+ click and CTRL + click to select Items. MultiSelect is not valid when set to False. The default is True

When Integralheightlistbox is set to true, adjust the height of the list box to ensure that some of the rows are displayed. When set to False, a list box can display partial rows. The default is falseitemheight to set the height of the item in the control. list boxes and combo boxes drawn by the user owner. The default is 13Items, which contains the item table in the list box, is a tstrings instance (specific properties and methods see the Tstrings section earlier in this chapter) Maxlengthcombobox the maximum number of characters that users can enter in the edit section of the combo box. The same as the maxlength of the edit control. When the default is 0 (infinite) MultiSelectListBox set to True, multiple items can be selected in the list box. Default to Falsesorted when set to True, list box items are sorted in ascending order, and False when set to False

Stylecombobox provides style options for combo boxes:

Cssimple,

Csdropdown

Csdropdownlist,

Lbownderdrawfixed,

Csownerdrawvariable, the default is Csdropdownlistbox provides the style options for the list box: lbstandard,lbownderdrawfixed, and Csownerdrawvariable, The default is Lbstandardtabwidthlistbox sets the width of the label in the list box (pixels), and the default is 0TextComboBox contains the text for the edit portion of the combo box. Run Property Itemindexlistbox contains the index of the currently selected item, 0 and the first item, and 1 indicates that the item is not selected. When writing, select the specified index Selcountlistbox contains the number of items selected in the Multiple select list box Selectedlistbox returns True when the specified item is selected. Otherwise, returns the length of the currently selected text Falsesellengthcombobox contains the edit portion of the combo box Selstartcombobox contains the starting point of the currently selected text for the edit portion of the combo box. The first character in the edit control is 0SelTextComboBox contains the currently selected text in the edit control Topindexlistbox returns the item at the top of the list box, you can set the top item to a list box item and the editing widget that is described earlier, and the list box and combo box do not have many methods. The clear () method clears all the data for the control, the Itematpos () method returns the list box items at the specified x, y coordinates, and the SelectAll () method selects the text of the edit portion of the combo box. The most commonly used event in a list box and combo box is the onclick event, which determines when a selection is made in the list box. Note Clicking a combo box edit section or Drop-down button does not trigger the OnClick event and triggers the onclick event only if you click the list portion of the combo box. The onchange event can trigger changes in the edit section of the combo box as you would in an edit control. Ondropdown Event detects if a combo box Drop-down button is clicked. The OnMeasureItem and OnDrawItem events are used by the owner-drawn list box and the owner-drawn combo box.

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.