# Re: Ｓetfous 问题???

Posted by AndyLin on September 12, 1998 at 09:30:11:

In Reply to: Ｓetfous 问题??? posted by nobody on September 12, 1998 at 09:20:21:

: 相邻两 text control(不相邻不会有问题),其 maxlength 各定 5 及 10, 但是不知为何当 text1 输入超过长度时, label1 的值并未显示在萤幕上???

: sub text1_lostfocus()
: if len(text1.text) > 5 then
: label1.caption = "error length"
: text1.setfocus
: end if
: end sub

: sub text2_lostfocus()

将程式移至 text_change 事件中试试看
: if len(text2.text) > 10 then
: label1.caption = "error length"
: text2.setfocus
: end if
: end sub

Follow Ups: