on 05-30-2007 11:09 PM
All,
I have created the Label at runtime. How can i make the label Bold at runtime?
Thanks..
BM
Hi Bharthi,
Inside "wdDoModifyView" use this code.Check the "id" for the label from properties and put it instead of <Label_ID>
IWDLabel label = (IWDLabel)view.getElement("<Label_ID>");
label.setText("Main Program Page");
label.setDesign(WDLabelDesign.EMPHASIZED);
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharati,
Using Armin's solution you can set n number of labels in your application to your desired design.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do not use wdDoModifyView(). Just <b>bind</b> the "design" property to a context attribute of <b>DDIC type</b> "LabelDesign". In the controller, set the attribute value to WDLabelDesign.EMPHASIZED.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
//@@begin wdDoModifyView
IWDLabel label=(IWDLabel)view.createElement(IWDLabel.class,"Label1");
label.setDesign(WDLabelDesign.EMPHASIZED);
label.setText("Label name");
IWDTransparentContainer container=(IWDTransparentContainer)view.getRootElement();
container.addChild(label);
//@@end
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,
if(firstTime)
{
IWDTransparentContainer tcont=(IWDTransparentContainer)view.getRootElement();
tcont.createLayout(IWDMatrixLayout.class);
IWDNodeInfo info1=wdContext.getChildNode("person",0).getNodeInfo();
for(Iterator it=info1.iterateAttributes();it.hasNext();)
{
IWDAttributeInfo attr=(IWDAttributeInfo)it.next();
IWDLabel lab=(IWDLabel)view.createElement(IWDLabel.class,attr.getName() +"Label");
lab.setText(attr.getName());
lab.createLayoutData(IWDMatrixHeadData.class);
lab.setDesign(WDLabelDesign.EMPHASIZED);
tcont.addChild(lab);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.