将数据项"Student"添加到名称为List1的列表框中,并使其成为列表框第一项的语句为(  )。

admin2015-10-23  34

问题 将数据项"Student"添加到名称为List1的列表框中,并使其成为列表框第一项的语句为(  )。

选项 A、List1.AddItem "Student", 0
B、List1.AddItem "Student", 1
C、List1.AddItem 0,"Student"
D、List1.AddItem 1,"Student"

答案A

解析 List控件的AddItem方法的语法是:AddItem(String,index)。其中index是列表框中列表项的索引值,第一项的索引值为0。
转载请注明原文地址:https://kaotiyun.com/show/4JLp777K
0

最新回复(0)