I can set the background of the main file progmatimcally with a tabhost fine. However, how could I set the background of another layout file progmatically.
You should create a Panel and add it with TabHost.AddTab2.
You will then be able to load the layout to the panel with Panel.LoadLayout and to change the Panel's background programmatically.