Hi! I am currently having problems with Dialog Box. It seems like
whenever I click on a button for a specific file, a dialog box for
that file pops up, and also, other dialog boxes that were hidden
before. Is there a way for me to dispose/remove the dialog boxes?
Thanks. Here's a part of the code.
Code:
//edit button is part of a grid that contains a file, upon clicking edit, it will show a dialog //box for user to edit the file selected
TextToolItem edit = new TextToolItem("Edit");
edit.addSelectionListener(new SelectionListener<ToolBarEvent>() {
@Override
public void componentSelected(ToolBarEvent ce) {
ce.stopEvent();
d = new Dialog();
d.addText("test "+ be.getSelectedItem().get("fileName"));
d.setButtons(Dialog.CANCEL);
d.setOnEsc(true);
d.setModal(true);
d.show();
}
});
Nothing's wrong on the first click, but on succeeding clicks of edit button, all the previously hidden dialog boxes (from other files edited) show up behind the current dialog box.