How to access the label of a control in code

前端 未结 5 601
天命终不由人
天命终不由人 2020-12-19 06:21

Often a label control is bound to a textbox or similar other control. I know that there is a way to access the label through code, but I do not remember how to do it.

<
5条回答
  •  不知归路
    2020-12-19 06:44

    With the textbox you can try

    Text0.Controls.Item(0).Caption
    

    where Control 0 is the linked label

提交回复
热议问题