This is a migrated thread and some comments may be shown as answers.

Manually trigger the resize event of the toolbar

4 Answers 470 Views
Toolbar
This is a migrated thread and some comments may be shown as answers.
Vasim
Top achievements
Rank 1
Vasim asked on 13 Sep 2014, 04:22 AM
How do I trigger the resize event of the toolbar after hiding buttons or Template type items in the toolbar?

This does not seem to work:

 $("#TheToolBar").data("kendoToolBar").resize();

The only way to trigger the overflow items to show up is to size the window manually

4 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 16 Sep 2014, 12:43 PM
Hi Vasim,

Could you please provide a small Kendo Dojo example which demonstrates your exact scenario and implementation so I can examine it?
I am not sure how the buttons are hidden and what you expect to happen when resize is called. Currently I cannot say if the scenario is supported or not.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Vasim
Top achievements
Rank 1
answered on 16 Sep 2014, 11:10 PM
Hello Alexander,

Here is an example:
http://dojo.telerik.com/eVEH/8

Size the window so that the font  ([B]old/[I]talic/[U]nderline) buttons are in the overflow
Then hide the Information label, I want to trigger the toolbar resize event so that the [B][I][U] group shows in the toolbar, and go back to the overflow when the info label is visible

It works as expected when I size the browser window
0
Accepted
Alexander Valchev
Telerik team
answered on 18 Sep 2014, 01:32 PM
Hello Vasim,

Thank you for the example.
Please try to explicitly force the ToolBar resizing by passing a true boolean parameter to the resize method.

toggleHide = (function() {
 
    if ($('#toggleHide').is(":visible")) {
        $('#toggleHide').hide()
    } else {
        $('#toggleHide').show()
    }
 
    $("#toolbar").data("kendoToolBar").resize(true);
 
});

I hope this will help.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Vasim
Top achievements
Rank 1
answered on 19 Sep 2014, 03:33 AM
This works great

Thank you!
Tags
Toolbar
Asked by
Vasim
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Vasim
Top achievements
Rank 1
Share this question
or