Categories | Question details Back To List | ||||||||||||||
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("<table border='1' cellpadding='0' cellspacing='0' width='100%'><tr><td>Message List</td><td align='right'><img src='img/refresh.png' width='24' height='24' onclick='get_mdata(document.getElementById(\"stock\").value);'></td></tr></table>"); Thank you, Max Answer posted by Alex (support) on Jun 17, 2009 23:26 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): <style> table.dhtmlxLayoutPolyContainer_dhx_blue td.dhtmlxLayoutSinglePoly div.dhtmlxPolyInfoBar div.dhtmlxInfoBarLabel { Answer posted by Max on Jun 19, 2009 08:57 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 Answer posted by Alex (support) on Jun 19, 2009 09:00 Try to add the following dhxLayout.cells("c").setText("... onclick='get_mdata(document.getElementById(\"stock\").value);(event||arguments[0]).cancelBubble=true;'..."); Answer posted by Max on Jun 19, 2009 09:10 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 Answer posted by Alex (support) on Jun 19, 2009 09:36 If you want to make all cells non-closeable, you can modify layout css and js as it is described in the attached file. Attachments (1)
Answer posted by Max on Jun 19, 2009 10:05 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. Answer posted by Alex (support) on Jun 22, 2009 06:50 Hello, please, see attached sample. The onclick event of the image is called correctly (even without changes that described in the txt file) Attachments (1)
|