Hi,
I want the the dialog window to have a max size of 400-width, 400-height no matter what. Initially it should not display scrollbars. However when i add an item to this window which is of width more than 400 then the size should still remain 400, 400. But it should display scrollbars.
How do i do that?
Appreciate your help
I am using SmartGWT version - 3
Below is the constructor of the my dialog window.
public class ScholarshipFormPopupDialog extends Dialog {
public ScholarshipFormPopupDialog(String title, int width, final BaseFormPane formPane) {
setShowToolbar(Boolean.FALSE);
setMargin(0);
setPadding(0);
setMaxWidth(width);
setMaxHeight(400);
setCanDragReposition(true);
setCanDragResize(Boolean.FALSE);
//setAutoSize(Boolean.TRUE);
/*setAutoHeight();
setAutoWidth();*/
setOverflow(getOverflow());
setWidth100();
setHeight100();
setRedrawOnResize(true);
setKeepInParentRect(true);
setAutoCenter(true);
setIsModal(true);
setShowFooter(false);
setShowModalMask(true);
setTitle(title);
this.addCloseClickHandler(new CloseClickHandler() {
public void onCloseClick(CloseClickEvent event) {
if (formPane.isDataChanged()) {
SC.ask(constants.saveBeforeCloseMessage(), new BooleanCallback() {
public void execute(Boolean value) {
if (!value.booleanValue()) {
ScholarshipFormPopupDialog.this.hide();
}
}
});
} else {
ScholarshipFormPopupDialog.this.hide();
}
}
});
addItem(formPane);
}
I want the the dialog window to have a max size of 400-width, 400-height no matter what. Initially it should not display scrollbars. However when i add an item to this window which is of width more than 400 then the size should still remain 400, 400. But it should display scrollbars.
How do i do that?
Appreciate your help
I am using SmartGWT version - 3
Below is the constructor of the my dialog window.
public class ScholarshipFormPopupDialog extends Dialog {
public ScholarshipFormPopupDialog(String title, int width, final BaseFormPane formPane) {
setShowToolbar(Boolean.FALSE);
setMargin(0);
setPadding(0);
setMaxWidth(width);
setMaxHeight(400);
setCanDragReposition(true);
setCanDragResize(Boolean.FALSE);
//setAutoSize(Boolean.TRUE);
/*setAutoHeight();
setAutoWidth();*/
setOverflow(getOverflow());
setWidth100();
setHeight100();
setRedrawOnResize(true);
setKeepInParentRect(true);
setAutoCenter(true);
setIsModal(true);
setShowFooter(false);
setShowModalMask(true);
setTitle(title);
this.addCloseClickHandler(new CloseClickHandler() {
public void onCloseClick(CloseClickEvent event) {
if (formPane.isDataChanged()) {
SC.ask(constants.saveBeforeCloseMessage(), new BooleanCallback() {
public void execute(Boolean value) {
if (!value.booleanValue()) {
ScholarshipFormPopupDialog.this.hide();
}
}
});
} else {
ScholarshipFormPopupDialog.this.hide();
}
}
});
addItem(formPane);
}