CheckListBox.checked [英] CheckListBox.checked

查看:91
本文介绍了CheckListBox.checked的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xp pro / vs 2002 / web forms / VB


如何在将复选框添加到复选框列表时选中复选框。


谢谢

xp pro/vs 2002/web forms/VB

How do I make a checkbox checked when add it to a checkboxlist.

Thanks

推荐答案

*" MSN" <为了************ @ msn.com> scripsit:
* "MSN" <To************@msn.com> scripsit:
如何在将复选框添加到复选框列表时选中复选框。
How do I make a checkbox checked when add it to a checkboxlist.




\\\

Me.CheckedListBox.Items.Add(" Foo",True)

///


-

Herfried K. Wagner [MVP]

< URL:http://dotnet.mvps.org/>



\\\
Me.CheckedListBox.Items.Add("Foo", True)
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


勘误表:


对不起,我错过了网页表格出于某种原因...


-

Herfried K. Wagner [MVP]

< URL:http:/ /dotnet.mvps.org/>
Errata:

Sorry, I missed the "web forms" for some reason...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


您好MSN,


您可以使用设计师而不是收藏和设置选择为真,


或者你可以在代码中完成它比

\\\\

Private Sub Page_Load(ByVal sender As System.Object,_

ByVal e As System.EventArgs)Handles MyBase.Load

Me.CheckBoxList1.Items(0).Selected =真的

结束子

///



在aspx html页面中

\\\

< asp:CheckBoxList id =" CheckBoxList1" style =" Z-INDEX:102;左:416px;

位置:绝对; TOP:304px"

runat =" server" Width =" 163px">

< asp:ListItem Value =" Eerste"已选择=" True"> Eerste< / asp:ListItem>

< / asp:CheckBoxList>

///


我希望这有帮助吗?


Cor
Hi MSN,

You can use the designer and than the collections and set selected to true,

Or you can do it in code than it is
\\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.CheckBoxList1.Items(0).Selected = True
End Sub
///
OR
In the aspx html page
\\\
<asp:CheckBoxList id="CheckBoxList1" style="Z-INDEX: 102; LEFT: 416px;
POSITION: absolute; TOP: 304px"
runat="server" Width="163px">
<asp:ListItem Value="Eerste" Selected="True">Eerste</asp:ListItem>
</asp:CheckBoxList>
///

I hope this helps?

Cor


这篇关于CheckListBox.checked的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆