cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Invisible Element Dynamically?

Former Member
0 Kudos

Dear All,

I am trying to create a Form dynamically and for aligment prupose i need to create one InvisbleElement also dynamically.But i dont know why that is not reflecting in the Screen .The code is deploying properly without error but the Invisible Element is not getting created .The code i used is

IWDInvisibleElement Invis1=(IWDInvisibleElement)view.createElement(IWDInvisibleElement.class,null);

Invis1.setEnabled(true);

Invis1.setVisible(WDVisibility.VISIBLE);

thetransparent.addChild(Invis1);

Can anyone please tell me if i need to set any property or if the method i am creating is wrong .Please guide me in the correct way.

Thanks and Regards,

Nishita Salver

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

place the below code where you want the invisible element in layout

IWDTextView t=(IWDTextView)view.createElement(IWDTextView.class,null);

t.setVisible(WDVisibility.BLANK);

i hope this will help you.

Thanks,

RameshBabu.V

Answers (5)

Answers (5)

Former Member
0 Kudos

Dear All,

I am happy to tell you'll that the invisible element are getting effected .

I only set the parent transparent container's width to "200px" and the gap i wanted is getting effected.

Thanks to one and all for your time and effort.

Thanks and Regards,

Nishita Salver

PradeepBondla
Active Contributor
0 Kudos

Now you can close the thread. make it answered.

Former Member
0 Kudos

Hi All,

Thanks for ur quick respsone.

Armin/Vinod : I am using a Transparent container as the Parent container and i have changed the layout to a "Gridlayout" with column count "3" and the widht as "200px"

Still the inivisible element ,I mean the space which i require between the label and the input field is not appearing.

Thanks and Regards,

Nishita Salver

Former Member
0 Kudos

Hi Nishita,

You can use padding property of the UI element for giving space between the UI elements. And if you specify the width of the layout in UI element property, this will also reduce or increase the space for the layout you r using.

No need to give the invisible element.

Regards,

Deepak

Former Member
0 Kudos

Your code is right, Try by Changing the default layout (FlowLayout) of the container and set the width property in % ( Eg 20%). Setting the width, will help you to find the difference in Element position.

Regards

Vinod V

Former Member
0 Kudos

The code looks ok, you don't need to set "enabled" and" visible" properties to default values. Are you sure the element is not created (it's invisible ;-)? What kind of layout has the parent container? Maybe you need to create non-default layout data for the invisible element?

Armin

PradeepBondla
Active Contributor
0 Kudos

Hi,

check "Dynamic Programming" part in below library file

http://help.sap.com/saphelp_nw70/helpdata/EN/0f/f08841e3af1609e10000000a155106/frameset.htm

or else,

still you are getting Problem, create any other ui element and set its visibility to false. (dont know how far it will help you)

regards,

Pradeep

Edited by: pradeep bondla on Jun 25, 2008 3:20 PM