如何把Combo
Box的下拉列表
显示成Check
Box? 如何把Combo
Box的下拉列表
显示成Check
Box,就像CheckedList
Box. (为什么有CheckedList
Box而没有CheckedCombo
Box) __________________________________________________________________________ '' 在窗体中加入一个CheckedList
Box,和一个Combo
Box Public Class Form1 Private Sub Form1_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.Load With Me.CheckedList
Box1 .Visible = False .Items.Add( "Check it out! ") .Items.Add( "How about this? ") .Items.Add( "Tis good too! ") .Height = Me.CheckedList
Box1.Items.Count * 18 .CheckOnClick = True End With Me.Timer1.Enabled = False Me.Timer1.Interval = 10 End Sub Private Sub Combo
Box1_DropDown(ByVal sender As Object,ByVal e As System.EventArgs) Handles Combo
Box1.DropDown Me.Combo
Box1.DropDownHeight = 1 With Me.CheckedList
Box1 .Top = Me.Combo
Box1.Top + Me.Combo
Box1.Height .Left = Me.Combo
Box1.Left .Width = Me.Combo
Box1.Width .Visible = True End With End Sub Private Sub CheckedList
Box1_MouseLeave(ByVal sender As Object,ByVal e As System.EventArgs) Handles CheckedList
Box1.MouseLeave Me.CheckedList
Box1.Visible = False Me.Combo
Box1.Text = " " For i As Int32 = 0 To Me.CheckedList
Box1.CheckedItems.Count - 1 Me.Combo
Box1.Text &= Me.CheckedList
Box1.CheckedItems(i).ToString & "," Next Me.Combo
Box1.Text = Me.Combo
Box1.Text.TrimEnd( ",") End Sub End Class __________________________________________________________________________ 我是从Cooly(☆不做开发很久了......☆)老兄的一个回帖里看到的。 参考:http://topic.csdn.net/t/20030304/15/1490274.html# __________________________________________________________________________ 学习 __________________________________________________________________________