HZNM.COM
welcome to my space
X
Search:  
 HOME   strange things with FormPanel
strange things with FormPanel
Published by: jack 2009-01-09
Welcome to:hznm.com

  • When you click on "click me" you'll see result which is shown in attachment screenshot. It's made in Firefox 2.
    In IE6 the only difference is DataList has no horizontal scroll bar.

    Am I doing something wrong?


    public class Test extends LayoutContainer implements EntryPoint {
    public void onModuleLoad() {
    Viewport v = new Viewport();
    v.setLayout(new FitLayout());
    v.add(this);
    RootPanel.get().add(v);
    }


    private ContentPanel north = new ContentPanel();
    Ext JS Library 2.2 * Copyright(c) 2006-2008, Ext JS, LLC ::
    .x-form-item-label {font-weight:bold;color:red;} </style> new Ext. FormPanel({ height: 100, renderTo: document.body, items: [{ xtype: 'textfield',
    http://www.geoext.org/trac/geoext/browser/ext/2.2/source/widgets/form/Field.js?rev=8&format=txt
    HOME
    private ContentPanel west = new ContentPanel();
    private ContentPanel center = new ContentPanel();
    private ContentPanel east = new ContentPanel();
    private ContentPanel south = new ContentPanel();

    protected void onRender(Element element, int i) {
    super.onRender(element, i);

    createBorderLayout();

    addFormPanel();
    }

    private void addFormPanel() {
    FormPanel formPanel = new FormPanel();
    formPanel.setLabelAlign(FormPanel.LabelAlign.TOP);
    formPanel.setHeaderVisible(false);
    formPanel.setBodyBorder(false);
    formPanel.setBorders(false);
    formPanel.setLabelWidth(210);
    formPanel.setFieldWidth(240);
    TextField networkAccountName = new TextField();
    networkAccountName.setFieldLabel("Name");
    formPanel.add(networkAccountName);

    DataList list = new DataList();
    list.setSelectionMode(Style.SelectionMode.SINGLE);
    list.setHeight(184);

    ComboBox comboBox = new ComboBox();
    comboBox.setFieldLabel("Combo");
    formPanel.add(comboBox);

    ListStore store = new ListStore();
    for (int i = 0; i < 40; i++) {
    store.add(new TestModelData("Item " + i));
    From douglas at music.columbia.edu Wed Jan 2 13:32:31 2008 From ::
    dorkbot: people doing strange things with electricity. . http://dorkbot.org .
    http://music.columbia.edu/pipermail/cmc-users/2008-January.txt
    HOME
    }

    DataListBinder binder = new DataListBinder(list, store);
    binder.setDisplayProperty("value");
    binder.init();

    StoreFilterField filterField = new StoreFilterField() {
    @Override
    protected boolean doSelect(Store store, TestModelData parent, TestModelData record, String property, String filter) {
    String name = record.getValue().toLowerCase();
    return name.startsWith(filter.toLowerCase());
    }
    };

    filterField.bind(store);
    filterField.setFieldLabel("Filter");
    formPanel.add(filterField);

    AdapterField listField = new AdapterField(list);
    listField.setFieldLabel("Objects");
    listField.setHeight(180);
    formPanel.add(listField);

    final Dialog dialog = new Dialog();
    dialog.setModal(true);
    dialog.setButtons("");
    dialog.add(formPanel);

    center.add(new Button("click me", new SelectionListener() {
    public void componentSelected(ComponentEvent event) {
    dialog.show();
    }
    }));
    }

    private void createBorderLayout() {
    setLayout(new BorderLayout());

    BorderLayoutData northData = new BorderLayoutData(Style.LayoutRegion.NORTH, 100);
    northData.setCollapsible(true);
    northData.setFloatable(true);
    northData.setSplit(true);
    northData.setMargins(new Margins(5, 5, 0, 5));

    BorderLayoutData westData = new BorderLayoutData(Style.LayoutRegion.WEST, 200);
    westData.setSplit(true);
    westData.setCollapsible(true);
    westData.setMargins(new Margins(5));

    BorderLayoutData centerData = new BorderLayoutData(Style.LayoutRegion.CENTER);
    centerData.setMargins(new Margins(5, 0, 5, 0));

    BorderLayoutData eastData = new BorderLayoutData(Style.LayoutRegion.EAST, 200);
    eastData.setSplit(true);
    eastData.setCollapsible(true);
    eastData.setMargins(new Margins(5));

    BorderLayoutData southData = new BorderLayoutData(Style.LayoutRegion.SOUTH, 100);
    southData.setSplit(true);
    southData.setCollapsible(true);
    southData.setFloatable(true);
    southData.setMargins(new Margins(0, 5, 5, 5));

    add(north, northData);
    add(west, westData);
    add(center, centerData);
    add(east, eastData);
    add(south, southData);
    }

    public class TestModelData extends BaseModelData {

    public TestModelData() {
    }

    public TestModelData(String value) {
    set("value", value);
    }

    public String getValue() {
    return get("value");
    }

    }

    }


  • Try your code with the latest from SVN.


  • works fine! thanks





  • How much does getting a small tattoo on your hip/stomach hurt?
    Do anyone else have an itchy anus? ?

    You are looking at:hznm.com's strange things with FormPanel, click hznm.com to home
  • tips for a first time tattoo
  • i need to make up a ninja turtle what should his name be
  • are you protective of your office chair or do peoples 039 chairs at the office get swapped around
  • best way to get tattoo practice
  • tattoo tipping please help
  • african americans and our hair
  • have you ever been obsessed with drawing eyes
  • how to make fake boobs
  • rude …
  • i want a hair cut with side swept bangs
  • men who would you rather date
  • what to expect when getting first tattoo
  • any real tattoo artists here
  •  
  • what 039 s it called when
  • tips for telling parents about tattoo
  • tattoo tips
  • tattoo tipping
  • what 039 s the best thing i could do to my nappy hair
  • tattoo tipping your opinion
  • how can i not make the same tattoo mistake again
  • survey anyone else hate when their lazy day gets turned upside down by work
  • cartilage piercing
  • famous fictional twins
  • i need some tattoo tips
  • is there a law that keeps you from buying a tattoo matchine and tattooing yourself or your friends
  • i got a tattoo tuesday and i was wondering when it will start peeling and stuff
  • i need my haircut butt idk how i should cut it help please
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 hznm.com        Site made:CFZ