SAP Control framework系列(09)
1.1.1 System event
基本上和application event差不多,只需要注意以下几点:
1).appl_event = space
2).不需要cl_gui_cfw=>Dispatch
3).需要重新设置ok_code
call method cl_gui_cfw=>set_new_ok_code
exporting new_code = 'XXX'.
4).需要重新处理新设置的OK_CODE
CASE OK_CODE.
WHEN ‘XXX’.
……
ENDCASE.
1.2 调用方法
1.2.1 可调用常用方法列表
SET_REGISTERED_EVENTS
注册事件
CONSTRUCTOR
创建对象的时候调用
DELETE_TEXT
删除所有文本
EMPTY_UNDO_BUFFER
清空UNDO缓存
FIND_AND_REPLACE
查找替换
FIND_AND_SELECT_TEXT
查找
GET_LINE_TEXT
取得某行的文本
GET_SELECTED_TEXT_AS_R3TABLE
把选择的文本放到内表中
GET_SELECTED_TEXT_AS_STREAM
get selected text as stream
GET_SELECTION_INDEXES
get absolute character indexes of selection
GET_SELECTION_POS
获得选择文本的位置
GET_TEXT_AS_R3TABLE
把文本放到内表
GET_TEXT_AS_STREAM
get whole text as stream from control (incl. "r" and "n")
GO_TO_LINE
跳到某一884C
HIGHLIGHT_LINES
高亮显示设定的行
HIGHLIGHT_SELECTION
把选择的文本高亮显示
INDENT_LINES
定义缩进的行
INDENT_SELECTION
对所选内容缩进
MAKE_SELECTION_VISIBLE
OPEN_LOCAL_FILE
打开本地文件,一般已经集成在toolbar里面了
PROTECT_LINES
set protect mode for a range of lines
PROTECT_SELECTION
set protect mode for selection
REGISTER_EVENT_CONTEXT_MENU
registration for event context menu
REGISTER_EVENT_DBLCLICK
registration for event double-click
REGISTER_EVENT_F1
registration for event key F1 pressed
REGISTER_EVENT_F4
registration for event key F4 pressed
REGISTER_EVENT_FILEDROP
egistration for event file dropped
REPLACE_ALL
replace all
SAVE_AS_LOCAL_FILE
save as local file
SELECT_LINES
select area of lines, not necessarily within visible part
SET_AUTOINDENT_MODE
set auto indent behavior on or off
SET_COMMENTS_STRING
set string which indicates the whole line is a comment
SET_FILEDROP_MODE
set file drop mode of TextEdit control
SET_FIRST_VISIBLE_LINE
SET_HIGHLIGHT_COMMENTS_MODE
SET_READONLY_MODE
set TextEdit control 'read only' flag true or flase
SET_SPACES_ON_INDENT
set number of spaces to use for indenting and unindenting
SET_SELECTION_POS
set text selection within control
SET_SELECTION_POS_IN_LINE
set selection to a certain line and position
SET_SELECTION_INDEXES
set selection using character indexes
SET_STATUS_TEXT
set status text in status bar of control
SET_TOOLBAR_MODE
set toolbar visibility of TextEdit control
SET_WORDBREAK_PROCEDURE
set wordbreak procedure
SET_WORDWRAP_BEHAVIOR
set wordwrap behavior of TextEdit control
UNINDENT_LINES
unindent a range of lines
UNINDENT_SELECTION
unindent selected text area
SET_NAVIGATE_ON_DBLCLICK
set navigate on double-click mode of TextEdit control
COMMENT_LINES
change a range of lines into comments
COMMENT_SELECTION
change a selected number of lines into comments
UNCOMMENT_LINES
uncomment a range of lines
UNCOMMENT_SELECTION
uncomment a selceted number of lines
DISPLAY_CONTEXT_MENU
display context menu
REGISTER_EVENT
event registration
UNREGISTER_EVENT
event registration
REGISTER_DRAGDROP
register at control framework for drag & drop
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/190059/viewspace-476644/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/190059/viewspace-476644/