08-10-2008 12:51 PM
Hi,
I have created two push buttons using the method add_button of cl_gui_toolbar class. But those two push buttons are coming side by side. But I need to show them one after the other.
Is there any way to display the buttons one after the other. I tried set_position, set_left, set_height. But still they are coming side by side.
Plesae guide me in this regard.
Regards,
Kishore
08-10-2008 3:02 PM
>But those two push buttons are coming side by side. But I need to show them one after the other.
I am not sure what you want from this....side by side and one after the other
* append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type. "<----Separator
APPEND ls_toolbar TO e_object->mt_toolbar.
* append an icon to show booking table
CLEAR ls_toolbar.
MOVE 'BUTTON' TO ls_toolbar-function.
MOVE icon_employee TO ls_toolbar-icon.
MOVE 'Show Bookings'(111) TO ls_toolbar-quickinfo.
MOVE 'Detail'(112) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
* append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type. "<----Separator
APPEND ls_toolbar TO e_object->mt_toolbar.
* append an icon to show booking table
CLEAR ls_toolbar.
MOVE 'BUTTON2' TO ls_toolbar-function.
MOVE icon_ok TO ls_toolbar-icon.
MOVE 'Show Flight'(113) TO ls_toolbar-quickinfo.
MOVE 'Flights'(114) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
Now you will get a separator in between the two buttons.
| BUTTTON1 | BUTTON2
08-10-2008 3:02 PM
>But those two push buttons are coming side by side. But I need to show them one after the other.
I am not sure what you want from this....side by side and one after the other
* append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type. "<----Separator
APPEND ls_toolbar TO e_object->mt_toolbar.
* append an icon to show booking table
CLEAR ls_toolbar.
MOVE 'BUTTON' TO ls_toolbar-function.
MOVE icon_employee TO ls_toolbar-icon.
MOVE 'Show Bookings'(111) TO ls_toolbar-quickinfo.
MOVE 'Detail'(112) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
* append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type. "<----Separator
APPEND ls_toolbar TO e_object->mt_toolbar.
* append an icon to show booking table
CLEAR ls_toolbar.
MOVE 'BUTTON2' TO ls_toolbar-function.
MOVE icon_ok TO ls_toolbar-icon.
MOVE 'Show Flight'(113) TO ls_toolbar-quickinfo.
MOVE 'Flights'(114) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
Now you will get a separator in between the two buttons.
| BUTTTON1 | BUTTON2
08-10-2008 4:23 PM
Hi,
I tried with the separator. But I need the buttons one after the other.
I want Button1 at line 1 and Button2 at line2.
Regards,
Kishore.
08-10-2008 5:12 PM
Do you have any sample program where you see the buttons in 2 rows.I never come across having buttons from Top to bottom. (The usual behaviour is Left to Right).
02-25-2009 1:21 PM
create object <toolbar>
exporting
parent = <container>
display_mode = CL_GUI_TOOLBAR=>M_MODE_VERTICAL