Manually trigger the resize event of the toolbar

5 posts, 1 answers
  1. Vasim
    Vasim avatar
    3 posts
    Member since:
    Jun 2013

    Posted 12 Sep 2014 Link to this post

    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

  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 16 Sep 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Vasim
    Vasim avatar
    3 posts
    Member since:
    Jun 2013

    Posted 16 Sep 2014 in reply to Alexander Valchev Link to this post

    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
  5. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 18 Sep 2014 Link to this post

    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!
     
  6. Vasim
    Vasim avatar
    3 posts
    Member since:
    Jun 2013

    Posted 18 Sep 2014 in reply to Alexander Valchev Link to this post

    This works great

    Thank you!
Back to Top
Kendo UI is VS 2017 Ready