Use the ListView for the first time

Source: Internet
Author: User

The first time using the ListView, Baidu Search learned some concepts, know how to add columns, rows (items, subkeys).

THIS.LISTVIEW1.COLUMNS.ADD ("Column 1", horizontalalignment.left);//Add Column
THIS.LISTVIEW1.COLUMNS.ADD ("Column 2", HorizontalAlignment.Left);
THIS.LISTVIEW1.COLUMNS.ADD ("Column 3", HorizontalAlignment.Left);
ListViewItem LV = new ListViewItem ();//Create Item
Lv.                  Text = "Li Zicheng"; Text displayed by the item
Lv.    SubItems.Add ("Communist bandits"); subkey for Item LV
Lv. SubItems.Add ("death penalty");
LISTVIEW1.ITEMS.ADD (LV);

The result of the run is always just not displayed.

Small white I searched, found that the ListView is really the way to add data. The majority of the genius know that the original want to display the list, you have to set the display way:

Listview1.view = View.Details;

Add this sentence and it's OK. Baidu Search code is not written in this sentence, it is estimated that they are set in the view ....

Use the ListView for the first time

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.