自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

界面編程C# ListBox的基本操作

開(kāi)發(fā) 后端
下面是C#界面編程的ListBox和ComboBox控件介紹,其中大部分是圍繞是C# ListBox介紹的,很基本,很實(shí)際的操作。

下面是C#界面編程的ListBox和ComboBox控件介紹,主要是關(guān)于關(guān)于C# ListBox的介紹。

  1. using System;  
  2. using System.Collections.Generic;  
  3. using System.ComponentModel;  
  4. using System.Data;  
  5. using System.Drawing;  
  6. using System.Text;  
  7. using System.Windows.Forms;  
  8. namespace ListAndCombo  
  9. {  
  10.     public partial class ListAndCombo : Form  
  11.     {  
  12.         public ListAndCombo()  
  13.         {  
  14.             InitializeComponent();  
  15.         }  
  16.         private void Form1_Load(object sender, EventArgs e)  
  17.         {  
  18.             //初始化設(shè)置  
  19.             //ListBox 設(shè)置  
  20.             listBox1.Items.Add("1000 以下");  
  21.             listBox1.Items.Add("1001~2000");  
  22.             listBox1.Items.Add("2001~3000");  
  23.             listBox1.Items.Add("3001~4000");  
  24.             listBox1.Items.Add("4001~6000");  
  25.             listBox1.Items.Add("6001~8000");  
  26.             listBox1.Items.Add("8001~10000");  
  27.             listBox1.Items.Add("10000 以上");  
  28.             //ComboBox 設(shè)置  
  29.             comboBox1.Items.Add("身份證");  
  30.             comboBox1.Items.Add("學(xué)生證");  
  31.             comboBox1.Items.Add("教師證");  
  32.             comboBox1.Items.Add("軍人證");  
  33.             comboBox1.Items.Add("護(hù)照");  
  34.         }  
  35.         private void listBox1_SelectedIndexChanged(object sender, EventArgs e)  
  36.         {  
  37.             label3.Text = listBox1.SelectedItem.ToString();  
  38.         }  
  39.         private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)  
  40.         {  
  41.             label4.Text = comboBox1.SelectedItem.ToString();  
  42.         }  
  43.     }  
  44. }  
  45.  

以上就是對(duì)編程界面實(shí)現(xiàn)的C# ListBox的簡(jiǎn)單介紹。

【編輯推薦】

  1. C#委托基礎(chǔ):談委托和接口
  2. 簡(jiǎn)單實(shí)現(xiàn)C# CheckBox單選的相關(guān)功能
  3. C# ServiceController類剖析
  4. C# HttpWebRequest提交數(shù)據(jù)方式淺析
  5. C#計(jì)算素?cái)?shù)序列淺談
責(zé)任編輯:阡陌 來(lái)源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2009-09-08 15:39:00

2009-09-08 17:37:54

C# listbox控

2009-08-12 15:50:40

C# ListBox

2009-08-19 11:21:02

C# ListBox控

2009-08-14 14:19:50

Enhanced LiC#構(gòu)建

2009-09-08 14:54:40

C# listBox控

2009-09-08 16:22:27

c# listBox

2009-09-02 18:11:24

C#鼠標(biāo)

2009-09-08 15:12:07

C# ListBox

2009-09-10 12:00:09

C# listbox

2009-09-08 16:34:49

C# Listbox

2009-09-08 16:01:58

C# ListBox

2009-08-21 14:47:39

C#網(wǎng)絡(luò)編程

2009-09-08 15:50:44

c# listbox

2009-08-19 15:38:59

C#代碼

2009-09-08 14:43:41

C# listbox

2009-08-11 15:44:05

C#基本技巧

2009-09-09 18:20:29

C# XML編程

2009-08-24 09:55:26

C#接口轉(zhuǎn)換

2009-08-24 11:02:52

C#接口映射
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)