on 05-25-2007 2:25 PM
Hi,
I want to dynamically create a checkbox in the layout. Can anyone give me sample coding how to create the same. Please don't give me sample coding for creating dynamic buttons as this doesn't work for checkbox.
Thanks in advance.
Regards,
Satheesh Raja.
Hi,
lo_container ?= m_view->get_element( 'name of layout container' ).
lo_checkbox = cl_wd_checkbox=>new_checkbox(
bind_checked = attribute_path
id = attr_ui_element_id
view = m_view ).
cl_wd_'layout type' =>new_'layout type'_data( element = lo_chackbox ).
lo_container->add_child( lo_checkbox ).
with layout type eg grid_layout
grtz
Koen
Message was edited by:
Koen Labie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
attribute_path is something like NODE1.SUBNODE1.ATTRIBUTENAME
depending on your nodes in your context (what you get in the checked box when you
declare your checkbox on designtime)
'attr_ui_element_id' is your id on your view, this is what you put in the id field in the
layout pane, naming conventions point at CKB_'name of checkbox' as id,
if i'm not mistaken.
m_view is the instance of the view, in wddomodifyview, it's an importing parameter,
you should bind it there to the attribute m_view in the view attributes.
put this in wddomodifyview:
if first_time is not initial.
wd_this->m_view = view.
endif.
and in the attributes pane: m_view type ref to if_wd_view
grtz
Koen
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.