Folks,

Simple question. I want dynamically add a widget, the code below does
not bring errors, however there is no visual effects that a component
was added. I tried to manipulate with doLayout, show, set visible - no
effect. If a component is added in the dialog constructor it is added
as expected.
The method setResults is supposed to change container content.

Thanks in advance.

--Zhenia

 public class VerificationResultsDialog extends Dialog {

        VerificationResultsPanel resPanel;
        Panel contentPanel;
        private static final int WIDTH = 800;
        private static final int HEIGHT = 500;

        static VerificationResultsDialog theDialog;

        protected VerificationResultsDialog() {
                super(ClientUtility.translate("verif.title"), true, OK | 
CANCEL);

                Panel p = new Panel();
                add(p);
                contentPanel = p;
                p.setBaseCls(SimplePanel.SIMPLE_PANEL);
                p.setLayout(new VerticalLayout());
                p.setAutoScroll(true);
                p.add(resPanel = new VerificationResultsPanel());

                setWidth(WIDTH);
                setHeight(HEIGHT);
        }

        static public VerificationResultsDialog getInstance() {
                if (theDialog == null)
                        theDialog = new VerificationResultsDialog();
                return theDialog;
        }

        public void setVerificationResults(VerificationStatusData vsd) {
                contentPanel.remove(resPanel, true);
                contentPanel.add(resPanel = new VerificationResultsPanel());
                resPanel.setVisible(true);
                resPanel.show();
                contentPanel.doLayout();
                this.doLayout();
                resPanel.setVerificationResults(vsd);

        }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to