PDA

View Full Version : Add widgets to ContentPanel



dmanchikalapudi
24 May 2010, 10:35 AM
I have a ContentPanel and need to add an icon (print icon) and an anchor "Print" on the ContentPanel's header section. I am able to add widgets to the body of the ContentPanel but not in the header. Any clue how to do it ?

jadrake75
25 May 2010, 10:42 AM
Given a content panel "contentPanel" and a print button "print_icon" did you try

contentPanel.getHeader().addTool( print_icon );

?

dmanchikalapudi
26 May 2010, 8:12 AM
Thanks for your reply jadrake. I did just that, but I see a "X" icon instead of my custom image. I have

contentPanelInstance.getHeader().addTool(new ToolButton("printIcon", new PrintSelectionListener() ));

and
.printIcon {
background-image:url(../images/default/panel/printIcon.gif);
}
in my custom css file. I can trace that its picking up correct styles using firebug, but the image does not show up. Any clue why ?