on 06-26-2006 2:11 PM
Hi,
In the wdDoModifyView method I need do the following:
1) Get the Tabstrip object using the view.
2) Create a IWDTab object (In a loop) and setting Caption using the IWDCaption for each tab created.
3) Create a IWDTransportContainer.
4) Create a IWDLinkToAction (In a loop) within the created IWDTransportContainer.
Can anyone pls provide me some details regarding this.
Thanks in advance.
Krishna
Hello Krishna,
Here is the sample code:
IWDTabStrip ts = (IWDTabStrip)view.getElement("TabStrip");
ts.setWidth("100%");
IWDNode n1 = wdContext.nodeRoot();
Iterator itr = n1.iterateElements();
for(int i = 0 ; i < size ; i++){
IWDNodeElement ne = (IWdNodeElement)itr.next();
IWDTab tab = (IWDTab)view.createElement(IWDTab.class,null);
IWDCaption caption = (IWDCaption)view.createElement(IWDCaption.class,null);
caption.setText("ur caption or ne.getAttributeValue() as u wish");
tab.setHeader(caption);
IWDTransparentContainer tc = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,null);
tab.addChild(tc);
IWDLinkToAction lta = (IWDLinkToAction)view.createElement(IWDLinkToAction.class,null);
lta.setText("ur text");
tc.add(lta);
ts.addTab(tab);
}
Hope this information helps.
Regards,
Sudeep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.