6.单击单行编辑框时选中文本框所有字符

实现功能:当用户单击单行编辑框时,选中编辑框内的所有字符,以便用户"替换录入"。

实现方法:不能在getfocus()中直接写入代码,需执行以下步骤:

    ①选择(new Event),创建单行编辑框的自定义单击事件ue_clicked() ,Event ID 为pbm_bnclicked,脚本代码为:

    this.selecttext( 1, len( this.text ) )

    ②getfocus事件的代码为:

    This.Post Event ue_clicked()

原文地址:https://www.cnblogs.com/lishk/p/3471015.html