PDA

View Full Version : transparent background



nks14
31 Aug 2009, 3:30 AM
i have a little problem. i have a borderlayout with north, west center. i want the center part to be transparent. how can i do that? please help me :D



public class usermoduleEntryPoint implements EntryPoint {

public usermoduleEntryPoint() {
}

public void onModuleLoad() {
Viewport viewport = new Viewport();

BorderLayout bl = new BorderLayout();
viewport.setLayout(bl);



HeaderComponent north = new HeaderComponent();



LeftComponent west = new LeftComponent();




ContentPanel center = new ContentPanel();

center.setHeaderVisible(false);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(0));


ExplorerWindow explorer = new ExplorerWindow(center);
center.add(explorer);




viewport.add(north, north.getHeaderData());
viewport.add(west,west.getWestData());
viewport.add(center,centerData);



RootPanel.get().add(viewport);





}

}


so, as you see, i need CENTER part to be TRANSPARENT.

Arno.Nyhm
31 Aug 2009, 4:58 AM
try to patch it via css to be transparent.
use firebug for the best testing.


but i have a problem with your code. you try to attach your class ExplorerWindow which extends "window" to the center layout? for this case you better use a layoutcontainer or a contentpanel to display a plain thing. and open your window with window.show

nks14
31 Aug 2009, 5:15 AM
try to patch it via css to be transparent.
use firebug for the best testing.


but i have a problem with your code. you try to attach your class ExplorerWindow which extends "window" to the center layout? for this case you better use a layoutcontainer or a contentpanel to display a plain thing. and open your window with window.show


can you please explain with an example? i mean the thing with layoutcontainer. pleeeease :D

Arno.Nyhm
31 Aug 2009, 5:19 AM
just look in the sourcecode of gxt to learn how to use layoutcontainer and contentpanel.

look here for a short description:
http://extjs.com/forum/showthread.php?p=379057#post379057


i dont know what is your ExplorerWindow and what your realy want to show. so this hints only a guess.