I am trying to create a dialog that can have a variable amount of text within it. If I set the height of my flow layout container, I can limit the size of the dialog and have the scrollbar effectively show the entire content.
However, I would like to have a maximum width and/or height (if the content is smaller, only show a dialog big enough to show the content).
Is this possible. I see a min width/height on the dialog, but no max. I tried adding max-height styles, but must not be attaching it (and I wonder if the dialog resizing ability would work with that).
Just hoping I'm missing something and GXT has this ability (somewhere). Maybe with a different container?
Code:
StringBuffer errorMessage = new StringBuffer();
errorMessage.append("<HR width=99% align=left/>");
errorMessage.append(content);
HTML formattedMessage = new HTML(errorMessage.toString());
FlowLayoutContainer layout = new FlowLayoutContainer();
layout.getScrollSupport().setScrollMode(ScrollMode.AUTOY);
// layout.setHeight(400);
layout.add(formattedMessage);
final Dialog dialog = new Dialog();
dialog.setHeadingText(title);
dialog.setShadow(true);
dialog.add(layout);
dialog.setAnimCollapse(true);
dialog.setModal(true);
dialog.setPredefinedButtons();
dialog.show();