On 22 sep, 07:42, ArunDhaJ <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm adding 4 images in a FlowPanel, it lines up continuously. When I
> try adding a space between images by adding a flowpanel.add(new
> HTML(" ") the alignment gets changed.
>
> FlowPanel toolBar = new FlowPanel();
> toolBar.add(new Image("images/image1.png"));
> toolBar.add(new HTML(" "));
> toolBar.add(new Image("images/image2.png"));
> toolBar.add(new HTML(" "));
> toolBar.add(new Image("images/image3.png"));
> toolBar.add(new HTML(" "));
> toolBar.add(new Image("images/image4.png"));
> toolBar.add(new HTML(" "));
> toolBar.add(new Image("images/image5.png"));
>
> Is this way correct?
What are you expecting? what happens that you didn't expect it to
happen?
> or is there any other suggestion ??
toolBar = new HTML("<img src=images/image1.png> <img src=images/
image2.png> <img src=images/image3.png> <img src=images/image4.png>
<images/image5.png>");
...but I guess this was just sample code and your images have
clicklisteners...
So how about using a border or margin to add spacing between your
images?
.toolBar .gwt-Image { margin-right: 4px; }
Or eventually you could try this (but beware of the side-effects if
you have to add/remove "tool bar buttons" later on):
toolBar.add(image1);
toolBar.getElement().appendChild(Document.get().createTextNode("
"));
toolBar.add(image2);
...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---