on 09-13-2013 11:45 AM
Hi all experts,
shorty:
I'm working on a view (IF_WD_VIEW), which has several containers that contain some UI_ELEMENTs.
Now, given a specific UI_ELEMENT, say, an inputfield named "X", I'd like to add an UI element before it.
An example could be helpful: I see in debug that my view has a lot of elements, something like this:
ROW | ID | VIEW_ELEMENT |
---|---|---|
... | ||
211 | ABC | ->{O:3870*\CLASS=CL_WD_MATRIX_HEAD_DATA} |
212 | BCD | ->{O:3871*\CLASS=CL_WD_INPUT_FIELD} |
... | ... |
I'd like to add a specific UI element (e.g., a Text View element, obviously with MatrixHeadData layout) in position 210, before the inputfield "ABC" shown in example.
I now that I can use the following syntax to add an element in position:
<my_container>->add_child( index = <my_index> the_child = <my_UI_element> ).
However, I don't find a way to get the index (row number) of the element 'ABC"...how can I do that?
Thanks
If i am not wrong you are talking to add some UI element in a Table at a specific index and column, If yes then in WDP its not possible. whatever you add in a column will be visible for all row..
.. Chans..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Suppose u want to add a text view in starting.
so here i am taking reference of 'ROOTUIELEMENTCONTAINER'
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
cl_wd_matrix_layout=>new_matrix_layout(
EXPORTING
container = lr_container ) .
you can read any container like this where you want to add your textview.
Here i am creating new textview.
DATA: lri_tom_6 TYPE REF TO cl_wd_text_view.
lri_tom_6 = cl_wd_text_view=>new_text_view(
id = `TXT_BID`
bind_text = 'NODE_USR_BOOK.BOOK_ID'
).
Now you need to add this newly added Text view into your desired container.
lr_container ->add_child( lri_tom_6 ).
..
Hope i am able to help you.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.