on 07-04-2008 6:22 AM
Hi all,
How do we create radio buttons at run time.
Thanks for the help.
Thanks for the response.But i do not know the number of radio buttons needed at design time. Based on the values populated in the context at run time I need to generate the no of radio buttons at runtime. Ho w is this achieved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you do not want to create radio buttons dynamically.
Define them statically and you can hide them on some conditions in your code.
Regards,
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In WDDOMODIFYVIEW put the code.
data: lr_radio type ref to cl_wd_radiobutton.
data: lr_containr type ref to cl_wd_transparent_container.
DATA: LR_DATA TYPE REF TO CL_WD_FLOW_DATA.
if first_time = abap_true.
lr_containr ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_radio = cl_wd_radiobutton=>new_radiobutton(
view = view
id = 'RADIO'
text = 'radio button'
BIND_SELECTED_KEY = 'TEXT'
KEY_TO_SELECT = 'R1' ).
LR_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( ELEMENT = LR_RADIO ).
LR_RADIO->SET_LAYOUT_DATA( LR_DATA ).
lr_containr->add_child( lr_radio ).
endif.
Abhi
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 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.