Setting Window Background Colors

I have created several windows and attached divs, charts and grids. Is there a way to set the background color of the window object through code? I’m sure this can be done by modifying the theme’s stylesheet but I need to change the colors dynamically

Something like the following.
w4= dhxWins.createWindow(“w4”, 20 , 20, 500, 500); = “blue”;

This creates the window okay, but does not change the background color.

You were close to the right solution: = “blue”;

Thank you for the promp response.
That seems to set the header and outside of the window but not the body itself.

I was hoping to set the background color of the window contents.

Thanks again,

There are two possible approaches:

  1. to define bg color for the content:
... win.attachObject('obj'); document.getElementById("obj").style.backgroundColor = "red";
  1. using private method and properties:

win.getView() = “blue”

That’s great thanks!

Hopefully one last question. How to I set the boarder/background color back to the theme default? I need to change the colors dynamically occasionaly I also need to return them back to their original colors.

For example, when I set… = “red”;

How do I now change it back to the default theme background?
I have tried the following but it just sets it back to a plain blue background, not the nice one included with the dhx_skyblue theme: = “”;

You will need to redefine the background color, image and repeat acording to the skyblue skin: = “#c2d5dc”; = “url(codebase/imgs/dhxwins_dhx_skyblue/active/header_bg.gif)”; = “repeat-x”;

Your example seems to work great in IE but not if firefox.
In IE the windows goes back to normal, in firefox it looks a little different. I have attached a screenshot to help

We have not reproduced the issue locally. Could you attach the completed demo.