工学

单选题引用ListBox(列表框)最后一个数据项应使用()语句A ListBox1.Items[ListBox1.Items.Count]B ListBox1.Items[ListBox1.SelectedIndex]C ListBox1.Items[ListBox1.Items.Count-1]D ListBox1.Items[ListBox1.SelectedIndex-1]

题目
单选题
引用ListBox(列表框)最后一个数据项应使用()语句
A

ListBox1.Items[ListBox1.Items.Count]

B

ListBox1.Items[ListBox1.SelectedIndex]

C

ListBox1.Items[ListBox1.Items.Count-1]

D

ListBox1.Items[ListBox1.SelectedIndex-1]

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

下列关于Web服务器端ListBox控件的说法不正确的是( )。

A.ListBox控件显示为列表框

B.ListBox控件只能实现单选

C.ListBox控件的选项中可以有默认选项

D.ListBox控件可以设置列表的显示高度


正确答案:B

第2题:

引用列表框ListBox1最后一个数据项应使用()。

A、ListBox1.Items(ListBox1.Items.Count)

B、ListBox1.Items(ListBox1.Items.Count-1)

C、ListBox1.Text

D、ListBox1.Items(ListBox1.SelectedIndex)


参考答案:B

第3题:

引用列表框(Listl)最后一个数据项应使用的表达式是( )。

A.Listl.List(List..ListCount)

B.Listl.List(Listl.ListCount-1)

C.Listl.List(ListCount)

D.Listl.List(ListCount-1)


正确答案:B

第4题:

引用列表框(List1)最后一个数据项应使用的语句是()。

A、List1.List(List1.ListCount)

B、List1.List(List1.ListCount-1)

C、List1.List(ListCount)

D、List1.List(ListCount-1)


正确答案:B

第5题:

在下面对列表框(ListBox1)的操作中,正确的语句是()。

A、Listbox1.Items.Cls

B、ListBox1.Items.Remove(4)

C、ListBox1.Items.Remove(“计算机“)

D、ListBox1.Items.Add(1,“打印机“)


正确答案:C

第6题:

假如列表框(List1)有4个数据项,要把最后一个数据项“china”删除的语句是( )。

A. 移去第一项

B. 移去最后一项

C. 程序无操作

D. 程序出错


参考答案:D

第7题:

向列表框中的最后填加一个新项目,正确的语句是()。

A、ListBox1.Items.Add(“HowareYou“)

B、ListBox1.Items.Insert(“HowareYou“)

C、ListBox1.Items.Add(2,“HowareYou“)

D、ListBox1.Items.Insert(2,“HowareYou“)


正确答案:A

第8题:

引用列表框(List1) 最后一个数据项应使用

A.List1.List(List1.ListCount)

B.List1.List(List.ListCount-1)

C.Lisl1.List(ListConut)

D.List1.List(ListCount-1)


正确答案:B
解析:ListCount属性返回控件的列表部分项目的个数。List属性返回控件的列表部分的项目,语法为[列表框名称].List(索引) 。

第9题:

在窗体中添加一个列表框(ListBox1)和一个命令按钮,并编写如下代码: Private Sub Commandl_Click() Dim a, i, msg msg="Choose OK to add 100 items to your listbox." MsgBox msg For i=l To 100 a="a:" &i ListAddltem a Next i End Sub 程序完成的功能是 ( )

A.本程序使用Addltem方法增加100项给一个列表框

B.本程序使用Addltem方法向一个列表框中添加100项,其内容是数字1~100

C.本程序使用Addltem方法向一个列表框中添加的内容是1~100的和

D.本程序使用Addhem方法增加100个列表框


正确答案:A
解析:向列表框中添加项目常用 AddItem方法,其格式为:列表框名.AddItem字符串[,序号]
题中的程序使用Addltem方法增加100项给一个列表框,其内容为a:i(i为l到100的数字)。分析各选项,只有A项是正确的。

第10题:

可通过()属性判断ListBox列表框控件的项目总数目。

AListIndex

BListText

CListcount

D随机数


C

更多相关问题