setText width in dhtmlxLayout?

Hi I’m trying to place some html code like the following, but cannot stretch out a table inside the setText method. Is there anyway around this? The reason I want this is to put text on the left of the header, and an image on the right. I’ve tried using style=“width:100%” inside a div, and that doesn’t work either.



dhxLayout.cells(“c”).setText(“

Message List
”);



Thank you,

Max




Hello,


you can try to include the following class to the page with layout - possibly it’ll solve the issue (in case of using dhx_blue skin):





table.dhtmlxLayoutPolyContainer_dhx_blue td.dhtmlxLayoutSinglePoly div.dhtmlxPolyInfoBar div.dhtmlxInfoBarLabel {
width:100%;
}




Thanks Alex, that worked great. I can now stretch my table 100% and place my small refresh gif to the right of the header. However, this leads to a new problem. The right of the header seems to work as a collapse button, even though I don’t see anything there. So when I try to click on my refresh gif, the collapse button takes precedence. I’ve tried dhxLayout.setEffect(“collapse”, false), but this seems to be ignored.

Any suggestions?

Thanks,
Max


Try to add the following


dhxLayout.cells(“c”).setText("… onclick=‘get_mdata(document.getElementById(“stock”).value);(event||arguments[0]).cancelBubble=true;’…");

Didn’t seem to work. When I hover over the gif, it still shows the ‘collapse’ text and actually collapses the cell. Here is the exact onclick event code I’m using:

onclick='get_mdata(document.getElementById(“stock”).value);(event||arguments[0]).cancelBubble=true;'

Is there not a way to just disable the collapse functionality?

Thanks,
Max

If you want to make all cells non-closeable, you can modify layout css and js as it is described in the attached file.
disable_buttons.txt (1.06 KB)

Well, it seems like it took away the functionality of the collapse and the hover text, but now my onclick event doesn’t work. It seems to be ignored now.

Sorry, this has been such a problem. Any other suggestions.


Hello,


please, see attached sample. The onclick event of the image is called correctly (even without changes that described in the txt file)


1245678747.zip (75.2 KB)