自定event事件之手动触发(一)
生活随笔
收集整理的這篇文章主要介紹了
自定event事件之手动触发(一)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
創建組件:Y_GLOBAL_EVENT
視圖:V_MAIN
窗口:W_MAIN
Application:Y_GLOBAL_EVENT
添加上下文
添加UI控件button和textview
?? ? ? ??
?在COMPONENTCONTROLLER 自定義event事件
在視圖V_MAIN中實現event事件
METHOD test_ent .DATA lo_nd_node_text TYPE REF TO if_wd_context_node.DATA lo_el_node_text TYPE REF TO if_wd_context_element.DATA ls_node_text TYPE wd_this->element_node_text.DATA lv_text_1 TYPE wd_this->element_node_text-text_1.lo_nd_node_text = wd_context->get_child_node( name = wd_this->wdctx_node_text ).lo_el_node_text = lo_nd_node_text->get_element( ).lv_text_1 = '握草!握草!握草!握草!握草!握草!握草!握草!握草!握草!'.lo_el_node_text->set_attribute( name = `TEXT_1` value = lv_text_1 ).ENDMETHOD.通過點擊按鈕觸發自定事件
METHOD onactiontest .DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).lo_componentcontroller->fire_test_ent_evt( ).ENDMETHOD.結果測試:
?
轉載于:https://www.cnblogs.com/SAPxiaox/p/9963241.html
總結
以上是生活随笔為你收集整理的自定event事件之手动触发(一)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Amazon S3数据存储
- 下一篇: DevExpress WinForms