复选框选择模式 [英] checklistbox selection mode
问题描述
我正在使用一个复选框,因此用户可以进行多个选择,但是选择模式不能设置为多个,我必须经历为复选框编写代码的工作,但是仍然有效,但是我仍然想知道是否仍然存在我可以使用清单框来完成...任何人都可以帮助我
谢谢...以下是我尝试过的代码
i am using a checklistbox so a user can make multiple selection but the selection mode cant be set to multiple, i have to go through the hustles of writing codes for checkboxes which is working though but i still want to know if theres anyway i can use checklistbox to accomplish that...could anyone help me
thanks...the following is codes i tried out
Dim checker As String
Dim check1 As String
Dim check2 As String
Dim check3 As String
Dim check4 As String
If CheckBox1.Checked = True Then
check1 = CheckBox1.Text
ElseIf CheckBox1.Checked = False Then
check1 = ""
End If
If CheckBox2.Checked = True Then
check2 = CheckBox2.Text
ElseIf CheckBox2.Checked = False Then
check2 = ""
End If
If CheckBox3.Checked = True Then
check3 = CheckBox3.Text
ElseIf CheckBox3.Checked = False Then
check3 = ""
End If
If CheckBox4.Checked = True Then
check4 = CheckBox4.Text
ElseIf CheckBox4.Checked = False Then
check4 = ""
End If
checker = check1 + " " + check2 + " " + check3 + " " + check4
这只是几个复选框...
我想将复选框的文本存储在变量"checker"中,但是当未选中checkbox1时,其他文本之前似乎有空格.我想摆脱该空间,以防未选中checkbox1.我希望这已经足够清楚了.
This is just a few of the checkboxes...
I want to store the text of checked boxes in a variable ''checker'' but when checkbox1 is not checked there seems to be space before other text. I want to get rid of that space in case checkbox1 is not checked. I hope this is clear enough.
推荐答案
可能会有所帮助,请参见: http://stackoverflow.com/questions/3833482/how-do-i-allow-the-user-to-multi-check-with-the-checkedlistbox-through-the-shif [ ^ ]
干杯,
保罗
May be of help, see: http://stackoverflow.com/questions/3833482/how-do-i-allow-the-user-to-multi-check-with-the-checkedlistbox-through-the-shif[^]
Cheers,
Paul
这可能会对您有所帮助.
我需要CheckedListBox值VB.net的帮助(初学者类型的问题) [ ^ ]
带有VB的ASP.NET .NET-启用了自动回发功能的ListBox或CheckBoxList上的MultiSelect [
Hi,
This might help you.
I Need Help With CheckedListBox Values VB.net (beginner type question)[^]
ASP.NET w/ VB.NET - MultiSelect on ListBox Or CheckBoxList w/ AutoPostback enabled[^]
--
Happy Coding!! :)
--
AP
这篇关于复选框选择模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!