|
楼主
楼主 |
发表于 2003-10-17 09:56:00
|
只看该作者
输入框问题
我做了一个类,父类是textentry,目的是当获取焦点是,textentry的背景色改变,失去焦点时,背景还原。我覆写了_binit,_tabin,_tabout三个method,增加了一个新的attribute:mycolor;
代码如下,请指正问题所在:
length _method_ $40 mycolor $24;
_method_=_method_;
_self_=_self_;
/* _binit: Initializes an object at design time */
BINIT: PUBLIC method;
call super(_self_,_method_);
call send(_self_,'_set_background_color_','background');
endmethod;
/* _tabIn: Invoked when object is made active */
TABIN: PUBLIC method;
dcl num rc;
mycolor=_self_._getAttributeValue('mycolor',rc);
call send(_self_,'_set_background_color_',mycolor);
_self_._update();
endmethod;
/* _tabOut: Invoked when object is made inactive */
TABOUT: PUBLIC method;
call send(_self_,'_set_background_color_','background');
_self_._update();
endmethod; |
|