1. #1
    Ext User
    Join Date
    Jan 2010
    Location
    London
    Posts
    8
    Vote Rating
    0
    shico is on a distinguished road

      0  

    Question toolTip for textArea control

    toolTip for textArea control


    Hello guys,

    I spent couple of hours trying in vain make tool tips work for TextArea control created dynamically.
    I added QuickTip initialization and then specified tooltip config property for the control, but it doesn't work.
    BTW tooltip property is not documented at all. I found it browsing the source code.
    Here is the code:

    Code:
           Ext.QuickTips.init();
    
            ...
    
            var txtDescription = new Ext.form.TextArea({
                xtype: 'textarea',
                height: 120,
                fieldLabel: 'Description',
                anchor: '99%',
                listeners: iDescription,
                tooltip: 'Please describe the product briefly.',
                value: this.configObj.product.Description
            });
    
            ....
    On runtime code from above transforms to following html (only part is shown):
    HTML Code:
    <textarea name="ext-comp-1147" id="ext-comp-1147" autocomplete="off" style="width: 1396px; height: 120px;" class="x-form-textarea x-form-field"/>
    What I basically need to do is just to add new attribute to html from above:
    HTML Code:
    <textarea ... ext:qtip="Please describe the product briefly." />
    If i do it manually (via FireBug) it works perfectly (see attachment).

    Any thoughts?

    P.S. It seems that this is a problem not for TextArea only but for any container controls, but works fine for Ext.Action
    Attached Images

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You could use:
    Code:
    listeners: {
      render: function(c){
        Ext.QuickTips.register({
          target: c.getEl(),
          text: 'Please describe the product briefly.'
        });
      }
    }
    (there are also plugins/overrides that can do this for you)

  3. #3
    Ext User
    Join Date
    Jan 2010
    Location
    London
    Posts
    8
    Vote Rating
    0
    shico is on a distinguished road

      0  

    Default


    Thank you, Mr. Condor!

    It helped

    BTW, I've realized what was my mistake. tooltip config property is valid for buttons, datepickers etc. but it is not used in conteiner controls.

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Location
    india
    Posts
    5
    Vote Rating
    0
    SrinivasKothuri is on a distinguished road

      0  

    Default


    I think Ext.QuickTips.init need to be called before register().

Similar Threads

  1. Get Tooltip associated with a control
    By r_honey in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 14 Jan 2010, 10:56 AM
  2. Replace textarea with Ext.form.TextArea
    By UnarmedHunter in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 26 Oct 2009, 1:00 AM
  3. equivalent control for GWT-Ext ColumnTree control
    By ialexei in forum Community Discussion
    Replies: 2
    Last Post: 8 Jan 2009, 1:40 PM

Thread Participants: 2

Tags for this Thread