
add_button
You use this method to add a new pushbutton to the toolbar.
CALL METHOD toolbar->add_button
EXPORTING fcode = fcode
icon = iconid
is_disabled = is_disabled
butn_type = butn_type
text = text
quickinfo = quickinfo
is_checked = is_checked
EXCEPTIONS cntl_error = 1.
Parameters |
Meaning |
fcode |
Function code that will be passed to the application program by an event when the user chooses the pushbutton. |
icon |
Icon to be displayed on the pushbutton. |
is_disabled |
'X' : Pushbutton is inactive' ' : Pushbutton is active |
butn_type |
cntb_btype_button : Pushbuttoncntb_btype_dropdown : Pushbutton with menucntb_btype_menu : Menucntb_btype_sep : Separatorcntb_btype_group : Pushbutton groupcntb_btype_check : Toggle buttonNote: You should use static menus wherever possible, since this helps to eliminate excessive roundtrips. This is especially important under SAPGUI for HTML. For further details, refer to set_static_ctxmenu or assign_static_ctxmenu_table. |
text |
Text to be displayed on the pushbutton. |
quickinfo |
Quick info for the pushbutton |
is_checked |
Only for pushbuttons with type cntb_btype_group and cntb_btype_check :'X' : Button is chosen' ' : Button not chosen |

You can address the icon using its name, for example,
ICON_ANNOTATION . To do this, the statement INCLUDE <ICON>. must appear in your program. The executable program SHOWICON displays all of the icons in your system.Otherwise, you can address the icons using the form
@xy@ , where xy is the relevant icon code.