I have created one CustomButton which consists of once image and one
label.

public class CustomButton extends Button implements ClickHandler{
        // call an empty constructor
        public ConfigButton() {
        }

        private Label conflbl;
        private Button btn;

        public CustomButton(String imgUrl, String btnText) {
                this.parentScreen = parentScreen;
                Image img = new Image();
                img.setUrl(imgUrl);
                img.setSize("20px", "20px");
                AbsolutePanel panel = new AbsoultePanel();
                panel.add(img, nleft + 110, ntop - 30);
                btn = new Button();
                btn.setSize("250px", "300px");
                conflbl = new Label(btnText);
                conflbl.setSize("130", "60");
                panel.add(btn, nleft, ntop);
                panel.add(conflbl, nleft + 60, ntop + 40);
                conflbl.addClickHandler(this);
                btn.addClickHandler(this);
        }
@Override
        public void onClick(ClickEvent event) {
                // Handle the label and the button click here.
                // Then raise a fresh Click handler. But How???
                this.Click() // This is not working

        }
}

I want to raise a click event once this button is clicked and
obviously in the OnClick() handler of the CustomButton should receive
Source as the CustomButton (Not as Button). This way our CustomButton
will work truly as a button. I tried calling this.Click() but it is
not raising the event.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to