Results 1 to 3 of 3

Thread: GXT Text Area default focus

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
      0  

    Default GXT Text Area default focus

    Hi,

    I am new to GXT.
    I want to set the default focus on GXT TextArea. I am using TextArea in a Dialog. When ever user clicks on Button, Dialog box will be displayed and by default cursor should be displayed in the TextArea to enter the text.

    I tried with TextArea.focus() method. But, its not working.
    I am using GXT API 2.1.1.

    Please help me in this.

    Thank you...
    Regards,
    Ramnath R

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    Instead of directing the widget to be focused every time it is displayed, tell the Dialog to focus on that widget whenever the Dialog is show()n. Dialog's superclass Window has a method setFocusWidget(Widget) which indicates that the given widget should be focused when show() is called on the window.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
      0  

    Thumbs up

    Hi,

    Thanks for your help. It solved my problem.

    Regards,
    Ramnath R

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •