This topic contains 2 replies, has 2 voices, and was last updated by  Alastair Walker 3 weeks, 2 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • How to hide a toolbar option #136688

    Alastair Walker
    Participant

    I am aware of the property in jqxtoolbar for disabling a tool bar control.

    But is it possible to hide (i.e. render invisible) a toolbar control?

    Any guidance on this matter will be appreciated!

    Alastair

    How to hide a toolbar option #136692

    admin
    Keymaster

    Hi Alastair,

    jqxToolBar does not provide a built-in API method specifically for hiding a tool while keeping it in the toolbar. The available API includes methods such as disableTool() (to enable/disable a tool) and destroyTool() (to remove a tool entirely).

    If you simply want a tool to be invisible, the usual approach is to access the tool element and hide it with jQuery/CSS:

    
    var tools = $('#jqxToolBar').jqxToolBar('getTools');
    
    // Hide tool at index 2
    $(tools[2]).hide();

    or

    $(tools[2]).css('display', 'none');

    If you need the toolbar layout to update after hiding the control, you can call:

    $('#jqxToolBar').jqxToolBar('refresh');

    Regards,
    Peter

    How to hide a toolbar option #136700

    Alastair Walker
    Participant

    Thank you very much!

    This is very helpful

    Alastair

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.