Re: Browser Issues- Please help me
HI All, Thank you so much for your guidance. I have changed the flow panel to vertical panel. and its working very fine. Thank you so much Venkat On Jan 21, 9:29 pm, Danny Schimke schimk...@googlemail.com wrote: I would use VerticalPanel. I think thats the easiest way and I never had sizing- problems with that widget. 2009/1/21 alex.d alex.dukhov...@googlemail.com 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);
Re: Browser Issues- Please help me
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)){
Re: Browser Issues- Please help me
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);
Re: Browser Issues- Please help me
I would use VerticalPanel. I think thats the easiest way and I never had sizing- problems with that widget. 2009/1/21 alex.d alex.dukhov...@googlemail.com 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);