PDA

View Full Version : GXT DIALOG CSS (background color)



FrankCA
12 Jan 2010, 2:00 PM
Hi All,

I'm trying to give me own look and feel to my GXT app by using CSS.
It's working well for most of my components but I'm having trouble with GXT Dialog.

For a simple dialog test example, with just an addText component,
I've tried setBodyStyleName which works for padding, font etc...
H O W E V E R ...
Nothing I try seems to be working for changing background color.

The question, as per image below, how to change background color, and also font and color for the title ??? ** source below **

http://www.zizi.com.au/gxtdialogcssquestion.PNG

** source snippet **


public class ZiZiDialog extends Dialog {
public ZiZiDialog() {
setModal(true);
setClosable(false);
setScrollMode(Scroll.AUTO);
setHideOnButtonClick(true);
setBodyBorder(false);
setPlain(true);
setBodyStyleName("zet_DialogBody");
//setStyleName("zet_DialogBody");
setHeading("BorderLayout Dialog BorderLayout Dialog");
addText("crap crap crap crap crap");
okText = "Save";
setButtons(Dialog.OKCANCEL);
show();
}
}


** CSS def **


.zet_DialogBody {
font-family: verdana, arial, helvetica, Sans Serif;
font-weight: bold;
background-color: #333333;
color: #ffffff;
height: 100px;
}


p.s. I've also tried setStyleName and addStyleName which dont appear to do anything...

Thanks in advance for your help.... :s:s

Arno.Nyhm
14 Jan 2010, 9:50 AM
i think you need also to set some child classes

like this additional lines:



.zet_DialogBody {
...
}


.zet_DialogBody .some-class-from-the-messagebox {
}


which class you need this you can find with firebug...