In VC, The ComboBox drop-down list does not show data or the drop-down table height is too small.

Source: Internet
Author: User

From: http://hi.baidu.com/%C4%BE%D2%B6%C1%B5/blog/item/9fd0e609cea3443de82488ce.html

Today, many people in csdn asked a question about the problem that the combo box drop-down list in VC does not display data. They added data correctly, however, clicking "combo box" at run time does not display data. The reason is very simple. When using the combo box control, there is a setting to display the size of the List area. The default display area is too small, therefore, data cannot be displayed. After you click the mouse in the lower triangle of the combo box, a drop-down icon is displayed, showing the list area to the drop-down list.

In addition, someone asked how to add data to the combo box. There are two methods: One: Right-click, select "attribute"-"data", and enter it, A row indicates a data record. Press Ctrl + enter to wrap the line. Add ComboBox. addstring ("Data name") to oninitdialog "). Values of the added items are arranged in ascending order, and the last added data item has the minimum value. The default value is 0. ComboBox. setcursel (0); you can set combo box to display 0th data items by default.

There are many usage cases for ComboBox, so I will not detail them in detail. For details, refer to msdn.

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.