Hi
i am also falled  in the same requirement i have done using a
FocusListener, but all my widgets has "width=100%" and all are in the
nested flexTables and finally which are in a disclosure panel.
My problem is when i focus on textBox/ TextArea which has large amount
of text in it (e.g: 200 characters), when the user focus the TextBox/
textArea it auto expanding to the length of the text in field.

so i am clue less why this behaviour is happening, help me if any body
has suggestions for this scenario

Thanks
Charan


On Apr 24, 3:03 am, Freller <[email protected]> wrote:
> Hi satya,
>
> I create one listener that I use on all my focus widgets. To use it
> just
>
> ForceOnFocusStyle.add(anyFocusWidet);
>
> Regards,
> Freller
>
> import com.google.gwt.user.client.ui.FocusListener;
> import com.google.gwt.user.client.ui.FocusWidget;
> import com.google.gwt.user.client.ui.Widget;
>
> public class ForceOnFocusStyle implements FocusListener {
>
>     public static final String FOCUS_STYLE_NAME = "focus";
>
>     protected ForceOnFocusStyle() {
>     } // end of
> ForceOnFocusStyle
>
>     protected static ForceOnFocusStyle __instance       = new
> ForceOnFocusStyle();
>
>     public static void add(FocusWidget victim) {
>         try {
>             victim.addFocusListener(    ForceOnFocusStyle.__instance);
>         } catch (ClassCastException exc) {
>         }
>     } // end of
> add
>
>     public static void remove(FocusWidget victim) {
>         try {
>             victim.removeFocusListener( ForceOnFocusStyle.__instance);
>         } catch (ClassCastException exc) {
>         }
>     } // end of
> remove
>
>     // Interface FocusListener
> --------------------------------------------------------------------------------------------------
>     public void onFocus(Widget sender) {
>         sender.addStyleName(    FOCUS_STYLE_NAME);
>     }
>     public void onLostFocus(Widget sender) {
>         sender.removeStyleName( FOCUS_STYLE_NAME);
>     }
>
> } // end of class
>
> ForceOnFocusStyle
--~--~---------~--~----~------------~-------~--~----~
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