Hello dear developers
How do I get a fixed width from IPickTreeItem?
It increases when I select an item.
before selection
after selection
How do I get a fixed width from IPickTreeItem?
It increases when I select an item.
Code:
DynamicForm selectForm = new DynamicForm(); selectForm.setWidth("100%"); selectForm.setNumCols(3); selectForm.setColWidths("33%", "34%", "33%"); selectForm.setHeight(25); ProjectsSelectItem selectedProjects = new ProjectsSelectItem(projectsData, project); selectedProjects.setWidth(300); selectedProjects.setMultiple(false); selectedProjects.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { loadProject((String) event.getValue()); } }); IPickTreeItem selectedCourseItem = new IPickTreeItem(); selectedCourseItem.setName("selectedCourseItem"); selectedCourseItem.setCanSelectParentItems(true); selectedCourseItem.setWidth(300); selectedCourseItem.setShowTitle(false); selectedCourseItem.setValueField(CONSTANT._ID); selectedCourseItem.setDisplayField(CONSTANT.TITLE); selectedCourseItem.setValueTree(projectTree); selectedCourseItem.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent event) { } }); UsersSelectItem selectedUsers = new UsersSelectItem("selectedUsers", usersData, new String[] {user}); selectedUsers.setWidth(300); selectedUsers.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { loadTasks(); } }); selectForm.setItems(selectedProjects, selectedCourseItem, selectedUsers);
after selection
Comment