Toolbar questions


Just 2 questions about toolbar (dhtmlxsuite V2.1).

First : Is it possible to have buttons or toolbar right align?

I saw in this post … e=2&q=4746 this command toolbar.setBarAlign(“right”); , but it does not work.

Second : Is it possible to align bottom a toolbar when attached to a layout cell?




unfortunately the latest toolbar (2.1) doesn’t support right align. The mentioned answer was related to 1.0 toolbar.

In order to place toolbar to the bottom of the cell you can use statusbar (dhtmlxWindows/codebase/ext/dhtmlxwindows_sb.js should be included)

var statusBar = dhxLayout.cells(cellId).attachStatusBar();

var toolbar = new dhtmlXToolbarObject(“toolbarObj”);

I’ve been looking at a similar issue where I was a menu bar where some buttons are on the left and some on the right. In order to achieve this I’ve used a text item on the menu with a size set to space the left and right items out.

toolbar.addText(“spacer”, 29, “”);
toolbar.setWidth(“spacer”, 200);

This seems to work well with some extra code to resize this as required when the page is resized.