on 05-12-2008 1:48 PM
dear all,
can you help me how to create checkbox during runtime?
thanks.
br,
donna
Hi,
Let's make an example where we create a Group that gets a MatrixLayout and resides within a container that has a FlowLayout
method wddomodifyview.
data:
lr_container type ref to cl_wd_uielement_container,
lr_group type ref to cl_wd_group.
get a pointer to the RootUIElementContainer
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
create the group and add it to the container
lr_group = cl_wd_group=>new_group( ).
cl_wd_flow_data=>new_flow_data( element = lr_group ).
cl_wd_matrix_layout=>new_matrix_layout( container = lr_group ).
lr_container->add_child( lr_group ).
endmethod.
Cheers,
K.Lakshmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Write in wd_do_modify_view().
Data: lr_ui_root type ref to if_wd_view_element,
Lr_container type ref to cl_wd_uielement_container.
*get reference to any node
Lr_ui_root = view->get_element(
Exporting
Id = ROOT UIELEMENTCONTAINER).
Lr_container ?= lr_ui_root.
*set container properties
Call method cl_wd_matrix_layout=>new_matrix_layout
Exporting
Container = lr_container.
*set width
Call method lr_container-.set_width
Exporting
Value = 100%.
Data :lr_check_box type ref to cl_wd_checkbox.
lv_cb_id type string,
lv_bind_checked type string,
lr_cb_new type ref to cl_wd_checkbox,.
Lr_check_box =cl_wd_checkbox=>new_checkbox(
exporting
id = lv_cb_id
bind_checked = lv_bind_checked
read_only = 'X'
receiving
control = lr_cb_new ).
Lr_container->add_child(exporting the_child = lr_check_box).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Donna,
Please read these: [/people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements], [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2915] [original link is broken] [original link is broken] [original link is broken]; and [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2953] [original link is broken] [original link is broken] [original link is broken];.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.