2010 Dec 30 6:28 PM
2011 Jan 18 7:46 PM
2011 Jan 18 8:02 PM
Hi
Typically every icon will have a ID assigned in ICON table... try to pass the ID from the ICON table on to the button text and see if that can be achieved.
2011 Jan 18 10:23 PM
Hi Emanuel,
create search help, play around with search help exit - standard search help exit function is well documented.
Regards,
Clemens
2011 Jan 18 10:34 PM
And what do you want to happen when you press this "keep" button? The keep function on search helps is very specific to search helps. What would it do in a FM to display text?
Rob
2011 Jan 19 4:41 PM
Thanks guys.
Rob: i need to display some info and hold it on front, such like 'keep button' does.
I'll try their chances today.
Thanks again.
2011 Jan 19 4:47 PM
Well, I think the answer to your question is "no". You'll have to write this yourself.
Rob
2011 Jan 19 5:07 PM
Hi Emanuel,
ah, may be know I understand:
If you use a dialog box (CL_GUI_DIALOG_BOX_CONTAINER), it will stay in foreground until closed. You can place an edit control in the dialog box, but yolu will need a handler for close it, i.e. like
DATA:
go_dialogbox TYPE REF TO cl_gui_dialogbox_container,
go_editor TYPE REF TO cl_gui_textedit.CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
close
FOR EVENT close
OF cl_gui_dialogbox_container.
ENDCLASS. "lcl_event_receiver DEFINITIONCLASS lcl_event_receiver IMPLEMENTATION.
METHOD close.
CALL METHOD go_editor->free.
FREE go_editor.
CALL METHOD go_dialogbox->free.
FREE go_dialogbox.
* finally flush
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
OTHERS = 1.
ENDMETHOD." close
ENDCLASS.
FORM showcontent USING pt_data TYPE table.
IF go_dialogbox IS INITIAL.
CREATE OBJECT go_dialogbox
EXPORTING
width = 800
height = 300
top = 50
left = 100
caption = 'Goil!'.
SET HANDLER lcl_event_receiver=>close FOR go_dialogbox.
ENDIF." go_dialogbox is initial.
IF go_editor IS INITIAL.
CREATE OBJECT go_editor
EXPORTING
parent = go_dialogbox
wordwrap_mode = cl_gui_textedit=>wordwrap_off
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
ENDIF.
CALL METHOD go_editor->set_toolbar_mode
EXPORTING
toolbar_mode = go_editor->true.
CALL METHOD go_editor->set_statusbar_mode
EXPORTING
statusbar_mode = go_editor->true.
* Set edit mode
CALL METHOD go_editor->set_readonly_mode.
* send table to control
CALL METHOD go_editor->set_font_fixed
EXPORTING
mode = cl_gui_textedit=>true.
CALL METHOD go_editor->set_text_as_r3table
EXPORTING
table = pt_data.
* finally flush
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
OTHERS = 1.
ENDFORM. " showcontentIf you want any special button (like your "HOLD", place it on the toolbar -> see class cl_gui_textedit)
Regards,
Clemens
2011 Mar 10 8:16 PM
Thanks Clemens, I finally solved it. I use a dialog box such you said, and, with class CL_GUI_TOOLBAR, I put the button i want. But I had to write the code myself.
Thanks everybody.