首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
窗体上有1个名称为Label1的标签;1个名称为List1,且含有若干表项的列表框。为了使得单击List1中某个表项时,在Label1中相应地显示该表项,应使用的程序代码为
窗体上有1个名称为Label1的标签;1个名称为List1,且含有若干表项的列表框。为了使得单击List1中某个表项时,在Label1中相应地显示该表项,应使用的程序代码为
admin
2018-09-19
27
问题
窗体上有1个名称为Label1的标签;1个名称为List1,且含有若干表项的列表框。为了使得单击List1中某个表项时,在Label1中相应地显示该表项,应使用的程序代码为
选项
A、Private Sub List1_Click()
Label1.Caption = List1.Index
End Sub
B、Private Sub List1_Click()
Label1.Caption = List1.ListCount
End Sub
C、Private Sub List1_Click()
Label1.Caption = List1.Text
End Sub
D、Private Sub List1_Click()
Label1.Caption = List1.Selected
End Sub
答案
C
解析
单击List1中某个表项时触发List1_Click()事件。标签的Caption属性用于设置标签中所要显示的内容。列表框的text属性为List1中表项的正文,通过这个属性可以得到被选中的项目。因此选C)。
转载请注明原文地址:https://jikaoti.com/ti/y5m0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
以下关于数组的叙述中,错误的是
对于窗体而言,在运行期间对其值改变无效的属性是
(1)在考生文件夹下有一个工程文件sjt3.vbp,相应的窗体文件为Sjt3.frm,在窗体上有一个命令按钮和一个文本框。程序运行后,单击命令按钮,即可计算出数组arr中每个元素与其下标相除所得的和,并在文本框中显示出来。在窗体的代码窗口中,已给出了部分程
(1)在名称为Form1的窗体上添加一个标签控件,名称为L1,标题为“请确认”;再添加两个命令按钮,名称分别为C1、C2,标题分别为“是”、“否”,高均为300,宽均为800,如图所示。请在属性窗口中设置适当属性满足以下要求:①窗体标
在软件开发中,需求分析阶段可以使用的工具是( )。
面向对象方法中,实现对象的数据和操作结合于统一体中的是
在数据库系统中,数据模型包括概念模型、逻辑模型和
如果要定义一个窗体级变量,定义变量语句的位置应该是
一间宿舍可住多个学生,则实体宿舍和学生之间的联系是( )。
下面属于白盒测试方法的是
随机试题
A、HeisinterestedinThaiartworks.B、Heisgoingtoopenasouvenirshop.C、Hecollectsthingsfromdifferentcountries.D、He
善治胃寒呕吐的药物是
职业健康检查应当由()人民政府卫生行政部门批准的医疗卫生机构承担。
焊接方法中,气焊主要应用于()。
当索赔事件持续进行时,承包方应当()向监理工程师发出索赔意向。
国别风险可能由()等情况引发。
经营杠杆本身并不是利润不稳定的根源。()
根据实验中自变量数量的多少,可把实验分为()
适合大样本,是对简单随机取样方法的一种改进。这种按一定的间隔,在总体中抽取样本的抽样的基本方法是
下面不能作为软件设计工具的是
最新回复
(
0
)