2009 Aug 12 2:58 PM
Hi, I have created one custom split container and split it to 2 rows.I'm adding push buttons in both rows(containers) using CREATE OBJECT toolbar_object & CALL METHOD toolbar_object->add_button
Could any one please help me out with:
(1) when I add push buttons in conainer, buttons are appearing without any gap. how do we have buttons with some space.
(2) how do we have header/title to identify the corresponsing containers/rows as I have created one custom split container and split it to 2 rows.
Thanks in advance.
2009 Aug 12 3:43 PM
thanks Marcin for the first one. for second one, yes please I wants to display titles/headers on each container.
some thing like after splitting and creating buttons it will look like:
-
button1 button2 ...
-
button3 button4 .....
-
but I would like to have some identification by header/titles like:
...header1/title1----
button1 button2 ...
-header2/title2--
button3 button4 .....
-
2009 Aug 12 3:34 PM
1)
type-pools: cntb.
call method mr_toolbar->add_button
exporting
fcode = ''
icon = ''
butn_type = cntb_btype_sep. "separator
2) not sure here what you want. Do you wan header to be dispalyed above each toolbar?
Regards
Marcin
2009 Aug 12 3:43 PM
thanks Marcin for the first one. for second one, yes please I wants to display titles/headers on each container.
some thing like after splitting and creating buttons it will look like:
-
button1 button2 ...
-
button3 button4 .....
-
but I would like to have some identification by header/titles like:
...header1/title1----
button1 button2 ...
-header2/title2--
button3 button4 .....
-
2009 Aug 12 3:58 PM
To achieve that you will have to split custom container into 4 parts (with cl_gui_splitter_container ). Now top row would be for heading, second for toolbar, next for heading, 4th for toolbar.
In each heading you can place dynamic document to display your header/title
DATA: r_dd_document TYPE REF TO cl_dd_document, "dynamic document ref.variable
r_custom_container TYPE REF TO cl_gui_custom_container.
CALL SCREEN 900.
MODULE pbo OUTPUT.
"first your initial custom container
CREATE OBJECT r_custom_container
EXPORTING
container_name = 'CUSTOM_CONTROL'.
"here you need to split cutom container in 4 parts
....
"now create dd document
CREATE OBJECT r_dd_document
EXPORTING
no_margins = 'X'.
"add header text
CALL METHOD r_dd_document->add_text
EXPORTING
text = 'Some heading'
sap_style = cl_dd_area=>HEADING.
"dispaly it in one of the containers
CALL METHOD r_dd_document->display_document
EXPORTING
parent = "here give reference to one of the containers you have
ENDMODULE.
Regards
Marcin
2009 Aug 12 4:26 PM
thanks Marcin. Appreciate your help and problem is resolved.
Points given. Thanks once again...