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=txtHOME |
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.txtHOME |
}
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? ?
|