zhyt
15 Jan 2009, 12:37 AM
Hi all. I've got a problem: cannot add a listener to a label. First I tried to use not Extjs LableField, but a just GWT-label:
Label senderLabel = new Label("sender");
senderLabel.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
........
}
});
But this does not suit me, because I need to use Extjs widgets.
So can you please tell me, how to add a listener to an instance of LabelField? And what do I have to do when I use next code:
TextField<String> field = new TextField<String>();
field.setFieldLabel("field");
Can I get a label at this time and add a ClickListner to it?
PS: I found a similar topic here, but there was a resolution for main class in method onModuleLoad() and this doesn's suit mee too.
PPS: sorry for grammar mistakes, I'm not very good at writting English.
Label senderLabel = new Label("sender");
senderLabel.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
........
}
});
But this does not suit me, because I need to use Extjs widgets.
So can you please tell me, how to add a listener to an instance of LabelField? And what do I have to do when I use next code:
TextField<String> field = new TextField<String>();
field.setFieldLabel("field");
Can I get a label at this time and add a ClickListner to it?
PS: I found a similar topic here, but there was a resolution for main class in method onModuleLoad() and this doesn's suit mee too.
PPS: sorry for grammar mistakes, I'm not very good at writting English.