在“预约”表单中有一个文本框TextInput和一个命令按钮CommanDOK,如果CommanDOK在命令按钮的某个方法中,访问文本框的Value属性值,正确的是()。A、ThisFrom,Parent,TextInput,ValueB、ThisFrom,TextInput,ValueC、TextInput,ValueD、Parent,TextInput,Value

题目

在“预约”表单中有一个文本框TextInput和一个命令按钮CommanDOK,如果CommanDOK在命令按钮的某个方法中,访问文本框的Value属性值,正确的是()。

  • A、ThisFrom,Parent,TextInput,Value
  • B、ThisFrom,TextInput,Value
  • C、TextInput,Value
  • D、Parent,TextInput,Value

相似考题
参考答案和解析
正确答案:B
更多“在“预约”表单中有一个文本框TextInput和一个命令按钮CommanDOK,如果CommanDOK在命令按钮的某个方法中,访问文本框的Value属性值,正确的是()。A、ThisFrom,Parent,TextInput,ValueB、ThisFrom,TextInput,ValueC、TextInput,ValueD、Parent,TextInput,Value”相关问题
  • 第1题:

    假定一个表单里有一个文本框Text l和一个命令按钮组CommandGroup1。命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,正确的表达式是( )。

    A.This.ThisForm.Text1.alue

    B.This.Parent.Parent.Text1.Value

    C.Parent.Parent.Text1.Value

    D.This.Parent.Text1.Value


    正确答案:B
    解析:我们知道,在文件系统的层次目录结构中,要标识一个文件,单用文件名往往是不够的,一般还要指明文件的位置,即目录路径。类似地,在对象的嵌套层次关系中,要引用其中的某个对象,也需要指明对象在嵌套层次中的位置。因为命令按钮组是一个容器对象,所以This.Parent表示按钮组,This.Parent.Parent表示表单,所以正确的表达式是选项B)。

  • 第2题:

    假定一个表单里有一个文本框Textl和一个命令按钮组CommandGroupl,命令按钮组是一个容器对象,其中包含Commandl和Command2两个命令按钮。如果要在20mmandl命令按钮的某个方法中访问文本框的Value属生值,下面式子正确的是( )。

    A.ThisForm.Textl.Value

    B.This.Parent.Value

    C.Parent.Textl.Value

    D.This.Parent.Textl.Value


    正确答案:A
    A。【解析】ThisForm表示当前对象所在的表单;Parent指当前对象的直接容器对象;This指当前对象;Val—ue是指当前表单文本框Textl的值,表示方法是ThisFrom.Textl.Value。

  • 第3题:

    在“预约”表单中有一个文本框TextInput和一个命令按钮CommandOK,如果CommandOK在命令按钮的某个方法中,访问文本框的Value属性值,正确的是( )

    A、ThisFrom,Parent,TextInput,Value

    B、ThisFrom,TextInput,Value

    C、TextInput,Value

    D、Parent,TextInput,Value


    正确答案:B

  • 第4题:

    一个表单里有一个文本框TextA和一个命令按钮CommandB。如果要在CommandB命令按钮的某个方法中访问文本框的Value属性值,正确的是( )。

    A、ThisForm.Value

    B、ThisForm.Parent.Texta.Value

    C、ThisForm.Texta.value

    D、Parent.Texta.Value


    正确答案:B

  • 第5题:

    假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1。命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,正确的表达式是( )。

    A)This.ThisForm.Text1.Value

    B)This.Parent.Parent.Text1.Value

    C)Parent.Parent.Text1.Value

    D)This.Parent.Text1.Value


    正确答案:B
    VFP中的对象一般可分为两种:容器对象和控件对象。容器可以包容其他的控件或容器,通常把容器对象称为那些被包容对象的父对象,这样就形成了对象的嵌套层次关系。在这种层次关系中,要引用其中的某个对象,就需要指明对象在嵌套层次中的位置。这时一般会用到一些引用属性或关键字,如PARENT是对象的一个属性,属性值为对象引用,指向该对象的直接容器对象;THIS、THISFORM和THISFORMSET是3个关键字,分别表示当前对象、当前表单和当前表单集。在所给题目中,共给出了5个对象,我们首先要清楚哪些是容器哪些是控件,以及它们之间的包容层次关系。表单是最外层的容器,其中有一个文本框控件Text1和一个容器命令按钮组CommandGroup1,而CommandGroup1中又有两个命令按钮控件Command1和Command2,故CommandGroup1是Command1和Command2的父对象,表单是CommandGroup1和Text1的父对象。现在要在Command1的方法中访问文本框Text1对象,即Command1当前对象,但由于Conmmnd1和Text1没有包容关系,故必须由Command1找到跟Text1有包容关系的对象来引用,也就是Text1的父对象表单。This代表当前的Command1,This.Parent指向父对象CommandGroup1, This.Parent.Parent则指向CornmandGmup1的父对象表单, This.Parent.Parent.Text1通过父对象表单引用了文本框Text1。
    对象访问属性的格式是:对象引用.对象属性。所以引用文本框Text1的Value属性,正确的表达式应该是This.Parent.Parent.Text1.Value。

  • 第6题:

    假定一个表单里有一个文本框text1和一个命令按钮组commandgroup1,命令按钮组是一个容器对象,其中包含Commandl和command2两个命令按钮,如果要在command1命令按钮的某个事件中访问文本框的value属性值,下面式子中正确的确是()

    • A、ThisForm.Text1.value
    • B、This.Parent.value
    • C、Parent.Text1.Value
    • D、This.Parent.Text1.value

    正确答案:A

  • 第7题:

    假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1,命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框Text1的Value属性值,下面表达式中,()是正确的。

    • A、ThisForm.Text1.Value
    • B、This.Parent.Value
    • C、Parent.Text1.Value
    • D、This.Parent.Text1.Value

    正确答案:D

  • 第8题:

    假定表单上有一个文本框对象Text1和一个命令按钮组对象Cmg,命令按钮组Cmg中包括Cmd1和Cmd2两个命令按钮,如果要在Cmd1命令按钮的某个方法中访问文本框对象Text1的Value属性值,下列表达式中正确的是()

    • A、This.ThisForm.Text1.Value
    • B、This.Parent.Parent.Text1.Value
    • C、Parent.Parent.Text1.Value
    • D、This.Parent.Text1.Value

    正确答案:B

  • 第9题:

    假定一个表单中有一个文本框Textl和一个命令按钮组CommandGroup1,命令按钮组是一个容器对象,其中包含Commandl和Command2两个命令按钮。如果要在Commandl命令按钮的某个方法中访问文本框的Value属性值,下面代码正确的是()。

    • A、ThisForm,Textl.Value
    • B、This.Parent.Value
    • C、Parent.Textl.Value
    • D、This.Parent.Textl.Value

    正确答案:A

  • 第10题:

    单选题
    假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1,命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮,如果要在Command1命令按钮的某个方法中访问文本框Value属性值,下面哪个式子是正确的()
    A

    This.Thisform.Text1.Value

    B

    This.Parent.Parent.Text1.Value

    C

    Parent.Parent.Text1.Value

    D

    This.Parent.Text1.Value


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    假定表单上有一个文本框对象Text1和一个命令按钮组对象Cmg,命令按钮组Cmg中包括Cmd1和Cmd2两个命令按钮,如果要在Cmd1命令按钮的某个方法中访问文本框对象Text1的Value属性值,下列表达式中正确的是()
    A

    This.ThisForm.Text1.Value

    B

    This.Parent.Parent.Text1.Value

    C

    Parent.Parent.Text1.Value

    D

    This.Parent.Text1.Value


    正确答案: D
    解析: 暂无解析

  • 第12题:

    单选题
    假定一个表单中有一个文本框Textl和一个命令按钮组CommandGroup1,命令按钮组是一个容器对象,其中包含Commandl和Command2两个命令按钮。如果要在Commandl命令按钮的某个方法中访问文本框的Value属性值,下面代码正确的是()。
    A

    ThisForm,Textl.Value

    B

    This.Parent.Value

    C

    Parent.Textl.Value

    D

    This.Parent.Textl.Value


    正确答案: C
    解析: 暂无解析

  • 第13题:

    假定一个表单里有一个文本框Textl和一个命令按钮组CommandGroupl。命令按钮组是一个容器对象,其中包含Commandl和Command2两个命令按钮。如果要在Cornmandl命令按钮的某个方法中访问文本框的Value属性值,正确的表达式是( )。

    A.This.ThisForm.Textl.Value

    B.This.Parent.Parent.Textl.Value

    C.Parent.Parent.Textl.Value

    D.This.Parent.Textl.Value


    正确答案:B
    B。【解析】在文件系统的层次目录结构中,要标识一个文件,单用文件名往往是不够的,一般还要指明文件的位置,即目录路径。类似地,在对象的嵌套层次关系中,要引用其中的某个对象,也需要指明对象在嵌套层次中的位置。因为命令按钮组是一个容器对象,所以This.Parent表示按钮组,This.Parent.Parent表示表单,所以正确的表达式是选项B。

  • 第14题:

    在一表单中,如果一个命令按钮Coml的方法程序中要引用文本框Textl中的Value属性值,下列中的______是正确的。

    A.ThisForm.Textl.Value

    B.This.Textl.Value

    C.Coml.Textl.Value

    D.This.Parent.Value


    正确答案:A

  • 第15题:

    一个表单里有一个文本框TextName和一个命令按钮CommandOK。如果在CommandOK命令按钮的某个方法中访问文本框的Value属性值,正确地是( )

    A、ThisForm.Value

    B、ThisForm.Parent.TextName.Value

    C、ThisForm.TextName.Value

    D、Parent.TextName.Value


    正确答案:C

  • 第16题:

    假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1,命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,下面哪个式子是正确的?

    A.ThisForm.Text1.Value

    B.This.Parent.Value

    C.Parent.Text1.Value

    D.This.Parent.Text1.Value


    正确答案:A
    解析:Parent代表当前控件存在的一个容器窗口,ThisForm代表当前表单,可以在当前表单中的任何一个控件内利用ThisForm.Text1来调用文本框对象。

  • 第17题:

    假定一个表单里有一个文本框Textl和一个命令按钮组Command Groupl,命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,下面()是正确的。

    • A、This.ThisForm.Text1.Value
    • B、This.Parent.Parent.Text1.Value
    • C、Parent.Parent.Text1.Value
    • D、This.Parent.Text1.Value

    正确答案:B

  • 第18题:

    个表单里有一个文本框Text Name 和一个命令按钮CommanDOK。如果在CommanDOK命令按钮的某个方法中访问文本框的Value属性值,正确地是()。

    • A、ThisForm.Value
    • B、ThisForm.Parent.Text Name.Value
    • C、ThisForm.Text Name.Value
    • D、Parent.Text Name.Value

    正确答案:C

  • 第19题:

    假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1,命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮,如果要在Command1命令按钮的某个方法中访问文本框Value属性值,下面哪个式子是正确的()

    • A、This.Thisform.Text1.Value
    • B、This.Parent.Parent.Text1.Value
    • C、Parent.Parent.Text1.Value
    • D、This.Parent.Text1.Value

    正确答案:B

  • 第20题:

    假定表单里有文本框对象TEXT1和命令按钮组对象CMG1对象各一个,CMG1中包含CM1和CM2两个命令按钮,如果要在CM1命令按钮的某个事件中访问文本框TEXT1的VALUE属性,下列式子正确的是()

    • A、PARENT.TEXT1.VALUE
    • B、THIS.TEXT1.VALUE
    • C、THISFORM.TEXT1.VALUE
    • D、THIS.THISFORM.TEXT1.VALUE

    正确答案:C

  • 第21题:

    单选题
    在“预约”表单中有一个文本框TextInput和一个命令按钮CommanDOK,如果CommanDOK在命令按钮的某个方法中,访问文本框的Value属性值,正确的是()。
    A

    ThisFrom,Parent,TextInput,Value

    B

    ThisFrom,TextInput,Value

    C

    TextInput,Value

    D

    Parent,TextInput,Value


    正确答案: B
    解析: 暂无解析

  • 第22题:

    单选题
    个表单里有一个文本框Text Name 和一个命令按钮CommanDOK。如果在CommanDOK命令按钮的某个方法中访问文本框的Value属性值,正确地是()。
    A

    ThisForm.Value

    B

    ThisForm.Parent.Text Name.Value

    C

    ThisForm.Text Name.Value

    D

    Parent.Text Name.Value


    正确答案: B
    解析: 暂无解析

  • 第23题:

    单选题
    假定一个表单里有一个文本框Textl和一个命令按钮组Command Groupl,命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,下面()是正确的。
    A

    This.ThisForm.Text1.Value

    B

    This.Parent.Parent.Text1.Value

    C

    Parent.Parent.Text1.Value

    D

    This.Parent.Text1.Value


    正确答案: A
    解析: 在使用相对引用对象的方法时,要注意This、This Form、Parent的层次关系,以及父子的指代关系,没有使用This或相关的对象名字指定一个对象,不能使用Parent。