SmartGWT version
Version v9.1p_2014-06-30/Enterprise Deployment (2014-06-30)
Browser: IE/FF/Chrome
Version v9.1p_2014-06-30/Enterprise Deployment (2014-06-30)
Browser: IE/FF/Chrome
Code:
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.NamedFrame; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.StaticTextItem; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.tab.Tab; import com.smartgwt.client.widgets.tab.TabSet; public class FrameTest implements EntryPoint { public void onModuleLoad() { HLayout canvas = new HLayout(); canvas.setWidth(500); canvas.setHeight(500); TabSet tabSet = new TabSet(); tabSet.setWidth100(); tabSet.setHeight100(); final Tab tab1 = new Tab("Tab1"); tabSet.addTab(tab1); VLayout wrapper = new VLayout(); wrapper.setWidth100(); wrapper.setHeight100(); wrapper.setBorder("1px solid red"); DynamicForm form = getNewForm("Item 1", "Item 1 value"); final NamedFrame frame = new NamedFrame("frame"); frame.setWidth("100%"); frame.setHeight("100%"); frame.setUrl("http://forums.smartclient.com/forumdisplay.php?f=14"); wrapper.addMember(form); wrapper.addMember(frame); tab1.setPane(wrapper); canvas.addMember(tabSet); canvas.draw(); } private DynamicForm getNewForm(String title, String value) { DynamicForm form = new DynamicForm(); form.setPadding(5); form.setMargin(10); form.setTitleSuffix(" :"); form.setBorder("1px solid green"); StaticTextItem item = new StaticTextItem(); item.setTitle(title); item.setValue(value); form.setFields(item); return form; } }
Comment