日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
界面編程C#ListBox的基本操作

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

網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)公司!專注于網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、微信平臺小程序開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了建鄴免費建站歡迎大家使用!

 
 
 
  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.  

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

【編輯推薦】

  1. C#委托基礎(chǔ):談委托和接口
  2. 簡單實現(xiàn)C# CheckBox單選的相關(guān)功能
  3. C# ServiceController類剖析
  4. C# HttpWebRequest提交數(shù)據(jù)方式淺析
  5. C#計算素數(shù)序列淺談

網(wǎng)站標(biāo)題:界面編程C#ListBox的基本操作
網(wǎng)頁網(wǎng)址:http://www.dlmjj.cn/article/cdodgdp.html