I have the following code in which TextItem.setWidth("100%") does not work correctly; Will this bug be fixed?
Code:
public class TestBug implements EntryPoint { public void onModuleLoad() { HTMLEditor editor = new HTMLEditor(); editor.setWidth("70%"); editor.setHeight("70%"); editor.init(); editor.draw(); } class HTMLEditor extends Window { public HTMLEditor () { } public void init() { setTitle("editProperty"); setRedrawOnResize(true); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); setKeepInParentRect(true); VLayout panel = new VLayout(5); panel.setMargin(5); panel.setWidth("100%"); panel.setHeight("100%"); DynamicForm courseObjectForm = new DynamicForm(); courseObjectForm.setWidth("100%"); courseObjectForm.setCellPadding(5); courseObjectForm.setTitleAlign(Alignment.LEFT); courseObjectForm.setTitleSuffix(":"); FormItemIcon editCourseObjectIcon = new FormItemIcon(); editCourseObjectIcon.setSrc("[SKINIMG]actions/" + "edit.png"); editCourseObjectIcon.setName("editCourseObjectIcon"); editCourseObjectIcon.setPrompt("editCourseObject"); StaticTextItem courseObjectValue = new StaticTextItem("courseObject", "course object"); courseObjectValue.setWidth("100%"); courseObjectValue.setIcons(editCourseObjectIcon); courseObjectValue.setWrapTitle(false); courseObjectForm.setFields(courseObjectValue); panel.addMember(courseObjectForm); DynamicForm form = new DynamicForm(); form.setWidth("100%"); form.setNumCols(2); form.setCellPadding(5); form.setCanHover(null); form.setShowHover(false); form.setTitleAlign(Alignment.LEFT); form.setTitleSuffix(":"); panel.addMember(form); TextItem titleValue = new TextItem("title", "title title title title title"); titleValue.setWrapTitle(false); titleValue.setWidth("100%"); form.setFields(titleValue); RichTextEditor textValue = new RichTextEditor(); textValue.setWidth("100%"); textValue.setHeight("*"); panel.addMember(textValue); Button cancelButton = new Button("cancel"); Button saveButton = new Button("save"); HLayout hLayout = new HLayout(5); hLayout.setAlign(Alignment.RIGHT); hLayout.setAutoHeight(); hLayout.addMembers(cancelButton, saveButton); panel.addMember(hLayout); addItem(panel); show(); centerInPage(); } } }
Comment