Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Dialog will not show single toolbar button

$
0
0
SmartClient Version: v10.0p_2015-08-20/PowerEdition Deployment (built 2015-08-20)

Tested only with Firefox


I've got a progress dialog that is displayed with a single button to cancel the request. This dialog did not have any issues in SmartGWT 4.0, but after upgrading to SmartGWT 5.0, the cancel button is no longer displayed.

I have a PleaseWaitDialog that extends Dialog and does the following:

Code:

this.cancelButton = new Button( "Cancel" );
this.setToolbarButtons( this.cancelButton );

When it is executed, it shows the dialog as displayed in the attachment OneButton.PNG

---
Other dialogs in the software still work with SmartGWT 5.0 for displaying buttons. The only difference I could see was the number of buttons. Therefore, I added another button:

Code:

this.cancelButton = new Button("cancel" );
Button fakeButton = new Button( "f" );
this.setToolbarButtons( this.cancelButton, fakeButton );

When executed, it shows the dialog with buttons as displayed in attachment WithFakeButton.PNG
---

I tried forcing the toolbar to show with a call to setShowToolbar(true), but this made no difference. The only way I was able to show a single button was to create a fake hidden button:

Code:

this.cancelButton = new Button("cancel" );
Button fakeButton = new Button( "f" );
fakeButton.hide();
this.setToolbarButtons( this.cancelButton, fakeButton );

When executed, it shows the dialog with the single button as displayed in attachment WithFakeButtonHidden.PNG


Is there something I could be doing incorrectly for a single button?

Attached Images
File Type: png OneButton.PNG (3.3 KB)
File Type: png WithFakeButton.PNG (4.1 KB)
File Type: png WithFakeButtonHidden.PNG (3.9 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles