Question

I have a gwt-ext EditorGridPanel, by clicking onto a cell, you can edit its value. The cursor is placed at the beginnig of the cell, but I want to select the whole text in this cell if the user clicks on it. Any idea how I can handle this?

I tried some Listeners etc. but none worked for me yet.

Was it helpful?

Solution

Sorry for my english, with Ext-GWT(GXT) it's posible doing this:

final TextField<String> text = new TextField<String>();
    text.setAllowBlank(false);
    CellEditor textEditor = new CellEditor(text);
    textEditor.addListener(Events.StartEdit, new Listener<EditorEvent>() {
      public void handleEvent(EditorEvent be) {
        text.setSelectOnFocus(true);
      }
    });
    column.setEditor(textEditor);
    configs.add(column);

Just find the way in GWT-Ext, I think will something like this.....I hope this help....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top