1. #1
    Sencha User
    Join Date
    Nov 2009
    Posts
    71
    Vote Rating
    0
    valery.stroeder is on a distinguished road

      0  

    Default Tooltip + title + widget

    Tooltip + title + widget


    Hello,

    I'm able to display a tooltip with title and text :

    Code:
    toolTip = new ToolTip(myButton, new ToolTipConfig("title", "text");
    I'm able to display a tooltip with text and widget

    Code:
    toolTip = new ToolTip(myButton);
    tooltip.add(myCustomWidget.getWidget());
    But I'm not able to display a tooltip with title text and widget
    Code:
    toolTip = new ToolTip(myButton);
    tooltip.setText("my text");
    tooltip.setHeading("title");
    tooltip.setTitle("title2");
    tooltip.getTooltipConfig().setTitle("title3");
    tooltip.getTooltipConfig().setHeading("title4");
    tooltip.add(myCustomWidget.getWidget());
    The tooltip has the text and the widget but no title !

    Code:
    toolTip = new ToolTip(myButton, new ToolTipConfig("myTitle", "myText"));
    tooltip.add(myCustomWidget.getWidget());
    The tooltip has the text and the title but not my custom widget !

    Any solution?

    Thanks in advance.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Simple add two widgets. One your widget and one representing the text. You can use the Html component for example.

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You will probably also need to override the updateContent method so it does not clear out the body.

  4. #4
    Sencha User
    Join Date
    Nov 2009
    Posts
    71
    Vote Rating
    0
    valery.stroeder is on a distinguished road

      0  

    Default


    Sorry but I dont understand your solution, could you post a simple example?

    -> A tooltip with a
    - title
    - text
    - widget (for example a TextField)

  5. #5
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Instead of a text you add two widgets.

    One widget represeting your text (Html component for example) and one widget which you want to use.

  6. #6
    Sencha User
    Join Date
    Nov 2009
    Posts
    71
    Vote Rating
    0
    valery.stroeder is on a distinguished road

      0  

    Default


    I'm actually abble to add
    - text (via addText or add(new Text("test"));
    - myCustomWidget

    However in this case I'm not able to display the title (tooltip's title in bold on the top of the toolTip). I'm able to display this title when I use the toolTipConfig constructor but in this case I'm not abble to add widgets..

  7. #7
    Sencha User
    Join Date
    Nov 2009
    Posts
    71
    Vote Rating
    0
    valery.stroeder is on a distinguished road

      0  

    Default


    Since the upgrade to GXT 2.1.1 my tooltips doen't work anymore. Here is a simple test case :

    Button button = new Button("button");
    Tooltip tooltip = new ToolTip(button);
    tooltip.add(new Button(" button in the tooltip"));

    (Should I create a new thread?)

    Thanks.

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You should try to post afully working testcase implementing EntryPoint.

  9. #9
    Sencha User
    Join Date
    Nov 2009
    Posts
    71
    Vote Rating
    0
    valery.stroeder is on a distinguished road

      0  

    Default


    Code:
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.extjs.gxt.ui.client.widget.tips.ToolTip;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class GWTModule implements EntryPoint {
    
        public void onModuleLoad() {
    
            Button button = new Button("button");
            ToolTip tooltip = new ToolTip(button);
            tooltip.add(new Button(" button in the tooltip"));
            RootPanel.get().add(button);
        }
    }
    The tooltip is empty...

  10. #10
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    I will reply with a quote of one post of this thread
    Quote Originally Posted by sven View Post
    You will probably also need to override the updateContent method so it does not clear out the body.
    You have not done that, the body gets cleaed out.

Similar Threads

  1. Replies: 1
    Last Post: 14 Sep 2010, 12:33 PM
  2. When loaded by Ajax, the tab title for BasiDialog widget disappears!
    By jaggybala in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 22 Oct 2007, 5:11 AM
  3. tooltip on the title bar?
    By newbie in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 12 Jul 2007, 8:13 AM
  4. title and tooltip
    By wavel in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 7 May 2007, 10:09 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi