Mangs
Mangs

Reputation: 1140

Remove OK button from dialog

I've created a Dialog using GXT, but I don't know how to remove the OK button.

My code for creating the dialog:

Dialog dialog = new Dialog();
dialog.setHeadingText("My group invites");
dialog.setPixelSize(100, 100);
dialog.setHideOnButtonClick(true);
dialog.addButton(new TextButton("TEST", new SelectHandler(){

    @Override
    public void onSelect(SelectEvent event) {
          // TODO Auto-generated method stub

    }

}));

Result: enter image description here

Anybody knows how to get rid of the OK button?

I'm using Sencha GXT 3.1.0 beta

Upvotes: 1

Views: 1082

Answers (2)

Daniel Ardison
Daniel Ardison

Reputation: 532

Before adding any button just do:

dialog.getButtonBar().clear();

That should work.

Upvotes: 0

Jens
Jens

Reputation: 69450

I think you can use the setPredefinedButtons Method from Dialog class.

Upvotes: 2

Related Questions