Hybrid View

  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default [CLOSED] Cannot add Button to FormPanel

    [CLOSED] Cannot add Button to FormPanel


    I am trying to add some buttons to a FormPanel and they never display

    final Window window = new Window();
    window.modal = true;
    window.shadow = false;
    window.maximizable = true;
    window.setWidth(600);
    window.setHeight(400);

    window.setLayout(new FillLayout());


    if (nodeType.equals("DEVICE") && windowType.equals("add")){
    final boolean enabled = true;
    final FormPanel<Field> panel = new FormPanel<Field>();




    TextField nameField = new TextField();
    nameField.setEmptyText("Device Name");
    nameField.fieldLabel = "Name";
    nameField.setEnabled(enabled);
    nameField.setTitle("Device Name");
    nameField.setToolTip("This is the name of the device");
    panel.add(nameField);


    TextArea descriptionField = new TextArea();
    descriptionField.setEmptyText("Description");
    descriptionField.fieldLabel = "Description";
    descriptionField.setEnabled(enabled);
    panel.add(descriptionField);

    CheckBox ignoreRomRadio = new CheckBox();
    ignoreRomRadio.fieldLabel = "Ignore Rom Id";
    ignoreRomRadio.setEnabled(enabled);
    panel.add(ignoreRomRadio);

    TextField startingDenaField = new TextField();
    startingDenaField.setEmptyText("Starting DENA");
    startingDenaField.fieldLabel = "Starting DENA";
    startingDenaField.setEnabled(enabled);
    panel.add(startingDenaField);

    TextField endingDenaField = new TextField();
    endingDenaField.setEmptyText("Ending DENA");
    endingDenaField.fieldLabel = "Ending DENA";
    endingDenaField.setEnabled(enabled);
    panel.add(endingDenaField);

    CheckBox ignoreDenaRadio = new CheckBox();
    ignoreDenaRadio.fieldLabel = "Ignore DENA";
    ignoreDenaRadio.setEnabled(enabled);
    panel.add(ignoreDenaRadio);

    TextField familyIdField = new TextField();
    familyIdField.setEmptyText("Family ID");
    familyIdField.fieldLabel = "Family ID";
    familyIdField.setEnabled(enabled);
    panel.add(familyIdField);

    TextField modelNumberField = new TextField();
    modelNumberField.setEmptyText("Model Number");
    modelNumberField.fieldLabel = "Model Number";
    modelNumberField.setEnabled(enabled);
    panel.add(modelNumberField);

    Button saveButton = new Button("Save");
    saveButton.addListener(Events.Click, new Listener<BaseEvent>(){

    public void handleEvent(BaseEvent be) {
    Info.display("CLICK","SAVE", "");

    }});

    Button cancelButton = new Button("Cancel");
    saveButton.addListener(Events.Click, new Listener<BaseEvent>(){

    public void handleEvent(BaseEvent be) {
    window.close();

    }});

    Button restButton = new Button("Reset");
    saveButton.addListener(Events.Click, new Listener<BaseEvent>(){

    public void handleEvent(BaseEvent be) {
    for (Field f : panel.getItems()){
    f.reset();
    }

    }});

    panel.add(saveButton);
    panel.add(cancelButton);
    panel.add(restButton);

    panel.header = false;
    panel.shadow = false;
    panel.layout(true);

    window.add(panel);
    window.layout(true);
    window.show();

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Try using panel.addButton(btn);

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi