PDA

View Full Version : GXT - invisible images



bostone
21 Aug 2009, 7:31 AM
Admin - please delete this duplicate post! Doesn't look like I can do it

Hi all,

I'm using GXT 2.0.1 and here's problem I'm having:
I created ImageBundle, put all my images to it
Here's part of my code that creates a button with text and image
ContentPanel window = new ContentPanel();
window.setLayout(new RowLayout(Orientation.VERTICAL));
add(window);
ToolBar toolBar = new ToolBar();
Button item1 = new Button("New", IMAGES.filenew());
item1.setIconAlign(IconAlign.TOP);
item1.setIconAlign(IconAlign.LEFT);
toolBar.add(item1);
window.setTopComponent(toolBar);When rendered - I can see that image map was created with all the images that I defined however, background is not correctly clipped and nothing is showing. Here's how it looks. Notice a small notch under the button - that's a very top of image I'm trying to show

http://img219.imageshack.us/img219/2719/snap012.png
Also - I'm trying to set image directly to ContentPanel by doing ContentPanel#setIcon(AbstractImagePrototype ) and then I inspect the pane with Firebug and I cannot see any references to the image or background URL, is this even supported and if not how should I do it?

I'm trying to avoid setting direct style references, very much interested in making AbstractImagePrototype work

Thanks for your suggestions

Bo