单选题
设列表框的名称为List1,则下列与List1.Text中的值相同的属性值是( )。
A、
List1.ListCount
B、
List1.List(List1.ListIndex)
C、
List1.List(ListCount-1)
D、
List1.ListIndex
【正确答案】
B
【答案解析】
列表框的List属性用来显示或设置列表项的内容,本题中,List1.Text返回当前被选择项目的内容。ListCount返回列表框中项目数量的数值;ListIndex设置返回当前被选择项目的索引号。B项,List1.List(List1.ListIndex)返回索引为List1.ListIndex的值,与List1.Text输出内容相同。
提交答案
关闭