Had almoust the same issue few weeks ago. At least i gave up on using
FlowPanel and switched to FlexTable which size i change dynamically.
May not be as elegant as using FlowPanel but at least it works in all
supported browsers.

On 21 Jan., 14:58, Adam T <adam.t...@gmail.com> wrote:
> Either set the size of your panels programmatically or through CSS -
> browsers can/will display FlowPanels differently which I believe is
> what you are seeing; or user a Vertical Panel for your check boxes/
> label combinations.
> //Adam
>
> On 21 Jan, 12:25, venkat raman <venkivo...@gmail.com> wrote:
>
> > Hi All,
>
> > I have created a composite panel and added widgets, I have added check box
> > too.
>
> > In IE as I attached the image, its working fine, the items are displying
> > vertically but in FF the items are displaying horizontally.
>
> > package com.client;
>
> > import com.google.gwt.user.client.ui.AbsolutePanel;
> > import com.google.gwt.user.client.ui.ChangeListener;
> > import com.google.gwt.user.client.ui.CheckBox;
> > import com.google.gwt.user.client.ui.Composite;
> > import com.google.gwt.user.client.ui.FlowPanel;
> > import com.google.gwt.user.client.ui.Image;
> > import com.google.gwt.user.client.ui.Label;
> > import com.google.gwt.user.client.ui.ListBox;
> > import com.google.gwt.user.client.ui.ScrollPanel;
>
> > import com.google.gwt.user.client.ui.TextBox;
> > import com.google.gwt.user.client.ui.Widget;
>
> > public class Panel extends Composite implements ChangeListener {
>
> >     ListBox listBox = new ListBox();
> >     FlowPanel flowPanel = new FlowPanel();
> >     FlowPanel flowPanel_1 = new FlowPanel();
> >     ScrollPanel scrollPanel = new ScrollPanel();
> >     TextBox textBox = new TextBox();
> >     Label friendsnameOrEmailLabel = new Label("Friends' Name or Email");
> >     FlowPanel flowPanel_2 = new FlowPanel();
>
> >     // values for friends
> >     final String strfrndsvalue =
> > "Venkat,Ram,Robert,Peter,Calvin,Bob,Sam,Tina,Prashob";
> >     String delimeter = ",";
>
> >     // values for groups
> >     final String strgrp = "Friends,Colleague,buddies";
> >     String delimiter1 = ",";
>
> >     final String str;
> >     final String strb;
> >     final String strcontact;
>
> >     public Panel(String titleText) {
> >         // private String str1;
>
> >         str = "Friends";
> >         strb = "Groups";
> >         strcontact = "Contact";
>
> >         final AbsolutePanel absolutePanel = new AbsolutePanel();
> >         initWidget(absolutePanel);
> >         absolutePanel.setSize("100px", "100px");
> >         // absolutePanel.setStyleName("gwt-apanel");
>
> >         final Image image = new Image();
> >         absolutePanel.add(image, 0, 0);
> >         image.setSize("310px", "30px");
> >         image.setUrl("images/alertmid.jpg");
>
> >         final Label contactsLabel = new Label("Contacts");
> >         absolutePanel.add(contactsLabel, 10, 5);
>
> >         // list box
> >         absolutePanel.add(listBox, 0, 35);
> >         listBox.setSize("300px", "25px");
> >         listBox.addItem(str);
> >         listBox.addItem(strb);
> >         listBox.addItem(strcontact);
> >         listBox.addChangeListener(this);
>
> >         // TextBox
> >         absolutePanel.add(textBox, 0, 253);
> >         textBox.setWidth("308px");
>
> >         // Friend's name or email Label
> >         absolutePanel.add(friendsnameOrEmailLabel, 10, 225);
>
> >         final Label shareLabel = new Label("Share");
> >         absolutePanel.add(shareLabel, 235, 280);
>
> >         // flowpanel
> >         flowPanel.setSize("300px", "153px");
>
> >         // Scroll Panel
> >         absolutePanel.add(scrollPanel, 0, 62);
> >         scrollPanel.setSize("300", "153");
> >         scrollPanel.setAlwaysShowScrollBars(false);
>
> >         //FLOW PANEL_2
> >         scrollPanel.setWidget(flowPanel_2);
> >         flowPanel_2.setSize("100%", "100%");
>
> >         // flowpanel2
>
> >         // flow Panel_1
> >         absolutePanel.add(flowPanel, 0, 59);
>
> >     }
>
> >     public void setTitleText(String titleText) {
> >     }
>
> >     public void onChange(Widget sender) {
> >         int selectedIndex = listBox.getSelectedIndex();
> >         String selectedText = listBox.getItemText(selectedIndex);
>
> >         if (selectedText.equals(str)) {
> >             textBox.setVisible(true);
> >             friendsnameOrEmailLabel.setVisible(true);
> >             flowPanel.setVisible(false);
> >             flowPanel_1.setVisible(false);
>
> >             // to get the cursor Position
> >             textBox.getCursorPos();
> >             scrollPanel.setWidget(flowPanel_1);
> >             flowPanel_1.setSize("100%", "100%");
> >             flowPanel_1.clear();
> >             String values[] = strfrndsvalue.split(delimeter);
>
> >             for (int i = 0; i < values.length; i++) {
>
> >                 CheckBox chk = new CheckBox(values[i]);
> >                 chk.setWidth("250px");
> >                 flowPanel_1.add(chk);
>
> >             }
>
> >         } else if (selectedText.equals(strb)) {
> >             flowPanel_1.setVisible(false);
> >             textBox.setVisible(false);
> >             friendsnameOrEmailLabel.setVisible(false);
> >             flowPanel.setVisible(true);
> >             scrollPanel.setWidget(flowPanel);
> >             flowPanel.clear();
> >             String value[] = strgrp.split(delimiter1);
>
> >             for (int j = 0; j < value.length; j++) {
>
> >                 CheckBox chk1 = new CheckBox(value[j]);
> >                 chk1.setWidth("250px");
> >                 flowPanel.add(chk1);
>
> >             }
>
> >         }else if(selectedText.equals(strcontact)){
>
> >             flowPanel_1.setVisible(false);
> >             flowPanel.setVisible(false);
> >             textBox.setVisible(false);
> >             friendsnameOrEmailLabel.setVisible(false);
> >             flowPanel_2.setVisible(true);
> >             scrollPanel.setWidget(flowPanel_2);
> >             flowPanel_2.clear();
> >             String value[] = strfrndsvalue.split(delimiter1);
>
> >             for (int j = 0; j < value.length; j++) {
>
> >                 CheckBox chk2 = new CheckBox(value[j]);
> >                 chk2.setWidth("250px");
> >                 flowPanel_2.add(chk2);
>
> >             }
> >         }
>
> >     }
>
> > }
>
> > Please help me.
>
> > Thanks & Regards,
> > venkat
>
> >  FF-image.bmp
> > 365KVisaHämta
>
> >  IE-image.bmp
> > 365KVisaHämta
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to