on 06-04-2007 4:36 AM
All,
I need to create the empty space between label & button dynamically..
Actually i am creating the label & button at runtime..
Label Here
Button Here
I want a output like below:
Label Here
"GAP Here
Button Here
How can i do that?
Thanks..
BM
For inserting vertical spacing, add a HorizontalGutter element as a separate row (using *HeadData as layout data).
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Say you are using a MatrixLayout and want (why ever) to achieve the following layout:
Label
<space>
InputField
Then you can achieve this by adding a Label, a HorizontalGutter and an InputField to the parent container and assigning a MatrixHeadData to each (such that a new row is started).
The amount of space can be controlled using the "height" property of the HorizontalGutter, the "ruleType" should be set to NONE.
Armin
What does that mean "THe classes are not having any methods"?
Just do something like:
IWDUIElementContainer panel = ...; /* assume MatrixLayout */
IWDLabel label = (IWDLabel) view.createElement(IWDLabel.class, null);
label.createLayoutData(IWDMatrixHeadData.class);
panel.addChild(label);
IWDHorizontalGutter vspace = (IWDHorizontalGutter) view.createElement(IWDHorizontalGutter.class, null);
vspace.createLayoutData(IWDMatrixHeadData.class);
vspace.setHeight(WDHorizontalDividerRuleHeight.SMALL);
vspace.setRuleType(WDHorizontalGutterRuleType.NONE);
panel.addChild(vspace);
IWDInputField input = (IWDInputField) view.createElement(IWDInputField.class, null);
input.createLayoutData(IWDMatrixHeadData.class);
input.bindValue("some_attribute");
label.setLabelFor(input.getId());
panel.addChild(input);
Armin
HI Bharati,
Try to get the space by adding a transparent container with height as below
IWDTransparentContainer l_trans_cont = (IWDTransparentContainer) view.getElement("RootUIElementContainer");
IWDTransparentContainer heightContainer = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class,"HeightContainer");
l_trans_cont.setHeight("200px");
l_trans_cont.addChild(heightContainer);
Regards
Fahad Hamsa
Hi,
Try this code,
IWDTransparentContainer tcont=(IWDTransparentContainer)view.getRootElement();
tcont.createLayout(IWDMatrixLayout.class);
IWDLabel lab=(IWDLabel)view.createElement(IWDLabel.class,"Label");
lab.createLayoutData(IWDMatrixHeadData.class);
lab.setDesign(WDLabelDesign.EMPHASIZED);
tcont.addChild(lab);
IWDInvisibleElement invisib = (IWDInvisibleElement) view.createElement(IWDInvisibleElement.class, "InvisibleEle");
tcont.addchild(invisib);
IWDButton button=(IWDButton)view.getElement("button1");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
IWDLabel label1 = (IWDLabel)view.createElement(IWDLabel.class,"lbl1");
IWDGridData layout = (IWDGridData) label1.createLayoutData(IWDGridData.class);
layout.setPaddingBottom("large");
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathi,
Try to create Web Dynpro InvisibleElement API - IWDInvisibleElement dynamically inbetween label and Button to fill the empty space. This element is used to fill the empty element in Grid layout.
With regards,
Laksh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathi,
Similar to creating a Label and Button dynamically, you can create an Invisible
Element dynamically between the two.
Following is the code:
IWDTransparentContainer l_trans_cont = (IWDTransparentContainer) view.getElement("RootUIElementContainer");
IWDInvisibleElement l_inv_ele = (IWDInvisibleElement) view.createElement(IWDInvisibleElement.class, "InvisibleEle0");
l_trans_cont.addChild(l_inv_ele);
Hope it helps.
Regards,
Alka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All.. I tried below code..But not expected result..
IWDTransparentContainer l_trans_cont = (IWDTransparentContainer) view.getElement("RootUIElementContainer");
IWDInvisibleElement l_inv_ele = (IWDInvisibleElement) view.createElement(IWDInvisibleElement.class, "InvisibleEle0");
l_trans_cont.addChild(l_inv_ele);
Pls help me..
BM
And also make the colcount for your group as 1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharati,
Make the RootUIElementContainer or your Group layout as gridlayout and select the padding bottom as large for your label properties.
Regards,
Suresh
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 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.