The question may be trivial but..

What makes a Widget compatible with Editors

I tried to make a Wiget  that is a modified ( expended ) LisBox
with setText and getText method , thinking they could be used by the Editor to set and the String

but it dosn't work

what 's missing ?

Patrick

===============================================
The "code"
===============================================
public class Lb extends ListBox {


   List<String> tks = Arrays.asList("X","Z","N","M","D");


   public Lb () {

       for (String s : tks) {

           addItem(s);

       }

   }


   public void setText (String tk) {

       for (Integer x = 0 ; x < tks.size(); x++) {

           if (tks.get(x).equals(tk)) {

               setSelectedIndex(x);

               break;

           }

       }

   }

   public String getText() {

       return getItemText(getSelectedIndex());

   }

}


--
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