ListView and Simple Notepad operations

Source: Internet
Author: User



Listview:


1 / / the column names of each column are added with the columns set
2                 ListViewItem lv = new ListViewItem();
3 Lv. Text = s.code. Tostring(); / / items in the first column of each row are added through text
4 Lv. Subitems. Add (s.name); / / items of other columns in each row are added through the subitems collection
5                 lv.SubItems.Add(s.Sex);
6 Lv. Subitems. Add (s.birthday. ToString ("mm / DD / yyyy));
7                 lv.SubItems.Add(s.Score.ToString("#.##"));
8 listview1. Items. Add (LV); / / each line is added with the items collection, and the added data is the value of each item above 


A simple Notepad operation:


1 private void exit xtoolstripmenuitem [click (object sender, EventArgs E)
2 {
3             this.Close();
4}
5
6 private void undo utoolstripmenuitem [click (object sender, EventArgs E)
7 {
8             textBox1.Undo();
9}
10
11 private void cut ttoolstripmenuitem [click (object sender, EventArgs E)
12 {
13             textBox1.Cut();
14}
15
16 private void copy ctolstripmenuitem [click (object sender, EventArgs E)
17 {
18             textBox1.Copy();
19}
20
21 private void paste ptoolstripmenuitem [click (object sender, EventArgs E)
22 {
23             textBox1.Paste();
24}
25 26 private void select atools stripmenuitem [click (object sender, EventArgs E)
27 {
28             textBox1.SelectAll();
29} 





ListView and Simple Notepad operations


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.