选择单击editorgridpanel(gwt-ext)的文本
题
我有一个gwt-ext editorgridpanel,通过单击单元格,您可以编辑其值。光标放置在单元格的开头,但是如果用户单击它,我想在此单元格中选择整个文本。知道我怎么能处理这个吗?
我尝试了一些听众等。但是还没有对我有用。
解决方案
对不起,我的英语,使用Ext-GWT(GXT),这是可以做到的:
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);
只要在gwt-ext中找到路,我认为会这样的事情.....我希望这是有帮助的。
不隶属于 StackOverflow