Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Phil on Jul 10, 2009 05:04
open dhtmlx forum
Toolbar questions

Hello,

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

First : Is it possible to have buttons or toolbar right align?
I saw in this post http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=13&page=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?

Regards

Phil
Answer posted by Alex (support) on Jul 10, 2009 07:34

Hello,

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();
statusBar.setText("<div id='toolbarObj' style='width:100%'></div>");
var toolbar = new dhtmlXToolbarObject("toolbarObj");
...



Answer posted by Matt on Jul 24, 2009 13:55

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.disableItem(
"spacer");
toolbar.setWidth(
"spacer", 200);

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