cancel
Showing results for 
Search instead for 
Did you mean: 

position for dynamic radio button

Former Member
0 Kudos

Hi expert,

i created a dynamic radio button in my web dynpro application but i want to give the position in top of the my view kindly give me on example for this issue.

thank's and regard's

vikash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Positioning your dynamic radio button would depend on your view design ( i.e static elements in your view ) and the layout that you have used.

If you could give more details about your view design it would help.

I would suggest you try this.

Create a static transparent container in your view and place it at the position where you want to display your radiobuttons. Then you can add your radiobutton to the transparent container at runtime.


 LR_FLOW_DATA  =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = lr_rbk  ).
 LR_CONTAINER ?= view->GET_ELEMENT( 'TRANSPARENT CONTAINER' ).
 LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON1  ).

You can also refer these blogs for dynamic programming:

Refer these blogs:

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2888] [original link is broken] [original link is broken] [original link is broken];[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2915] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2953] [original link is broken] [original link is broken] [original link is broken];

Regards,

Radhika.

Answers (2)

Answers (2)

arjun_thakur
Active Contributor
0 Kudos

Hi Vikash,

Positioning of UI elements on the view completely depends on the layout type which is being used. Refer the code given in this thread : https://forums.sdn.sap.com/click.jspa?searchID=25606661&messageID=7329560. This create the radio button on the top of the screen.

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Use this.............

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae814...

The sequence to place a new UIElement at the screen is as follows:

1.Create the UIElement

2.Create the LayoutData that fits to the Layout of the surrounding container

3.Insert the UIElement into the surrounding container

*Code to create new button dynammically:

lr_button = cl_wd_button=>new_button( on_action = `CHANGE_TEXT` ).

**The following coding changes the design of a button to "emphasized":*

lr_button->set_design( cl_wd_button=>e_design-emphasized ).

    • set the new text*

lr_button->set_text( new_text ).

For Step 2 and Step 3 refer code by Radhika.

Thanx.

Saurav.