cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic creation of TabStrip

Former Member
0 Kudos

Hi,

I want to create a tabstrip dynamically.The tabstrip should have 3 tabs, and in each of the tabs i want to put some UI elements like a label, input field, dropdown, tables.........etc.

Im able to create the tabstrip and add tabs to it dynamically.

I've even created the UI elements which i wanted to put in the tabs.............But im not able to proceed as i dont know how to add the UI elements to the tabs.......

Can anyone tell me how to add UI elements to a tab in a tabstrip?

Regards,

Padmalatha.K

Points will be rewarded.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can create tab dynamically right. Now create a transparentContainer, add all the child UI elements to this container and finally add content to the Tab using tab.setContent() method in which you pass the tranparentContainer object.

Hope this helps.

thanks & regards,

Manoj

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Following code will help you to understand the dynamic creation and adding them


//Tabstrip 
	  IWDTabStrip tabStrip = view.createElement(IWDTabStrip.class);
	  //Tab
	  IWDTab tab = view.createElement(IWDTab.class);
	  //Input Field
	  IWDInputField inputField = view.createElement(IWDInputField.class);
	  
	  //Adding inputfield to tab
	  tab.setContent(inputField);
	  //Adding tab to tabstrip
	  tabStrip.addTab(tab);
//Finally add this tabstip to either your root container or some other container.

Regards

Ayyapparaj