Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Enabling scrollbars when the size of the dialog Window exceeds a particular limit

$
0
0
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);
}

Viewing all articles
Browse latest Browse all 4756

Trending Articles