Confirmation for closing tabs

Is it possible to have a SC.confirm box pop up for closing a tab? I have a tab that contains a form, and I would like to be able to close that tab but ask confirmation first.

Alternatively, I was going to just create a button and add it to the tab and then use that button to remove the tab, but then I had trouble getting both the button and the form to show up in the tab. I created a VLayout and added the button and the form to the VLayout, set the VLayout as pane in the tab, and the only thing that shows up is the button. Not sure if this has to do with adding forms to layouts or working with tabs or what.

Anyways - just trying to get a good solution / method that allows user to close tabs, but only after confirmation.

There’s a closeClick() override point available in SmartClient. Can you add an issue for providing this override point in SmartGWT?

well I am using:

tabSet.addCloseClickHandler(new CloseClickHandler() {
  public void onCloseClick(final TabCloseClickEvent event) {
    if (screenIsClosed) { //screenIsClosed is a boolean, could come from SC.ask()
      tabSet.removeTab(event.getTab());
      tabSet.markForRedraw();
    }
  }
});

And it works just great.