论坛版主
- 发帖数51
- QQ123523507
- 金币623两
- 威望195点
- 钻石0枚
- 注册日期2016-11-12
- 最后登录2020-04-01
|
阅读:13976回复:3
tiptop文本框实时监测输入的内容
楼主#
更多
发布于:2016-11-12 07:53
- INPUT field FROM field
- ON ACTION dialogtouched #动态获取的ACTION,文本框文本改变一次就将出发一次dialogtouched
- IF FGL_DIALOG_GETFIELDNAME() = "field" THEN
- CALL arr.clear()
- LET filter = FGL_DIALOG_GETBUFFER()
- LET l_sql = "select gen01,gen02 from gen_file where gen01 like '%",filter,"%'"
- PREPARE filter_p FROM l_sql
- DECLARE filter_curs CURSOR FOR filter_p
- LET l_ac =1
- FOREACH filter_curs INTO arr[l_ac].*
- LET l_ac= l_ac+1
- END FOREACH
- CASE arr.getLength()
- WHEN 1 CALL f.setfieldstyle("field","green")
- WHEN 0 CALL f.setfieldstyle("field","red")
- OTHERWISE CALL f.setfieldstyle("field","")
- END CASE
- END IF
- END INPUT
|