1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    sweetstian is on a distinguished road

      0  

    Default How to customize the style of qtip on the TreeNodes in a TreePanel

    How to customize the style of qtip on the TreeNodes in a TreePanel


    Hello,

    I
    use the qtip attribute in the html of TreeNode in order to get different tooltips for each TreeNode in a TreePanel. I would like to make some change of the tooltip style, e.g. make it stay so that the mouse can go over it, but however I configure the ToolTipConfig of the TreePanel (on which the QuickTip is added), it cannot change the QuickTip of TreeNodes. If the ToolTipConfig is set directly to the TreePanel, it configures only another tooltip of the TreePanel, but not the floating qtip I see on each TreeNode.

    Is there any solution to make a qtip which could stay for a delay or closable qtip on each TreeNode of a TreePanel?

    Here is my code:
    Code:
            QuickTip quickTip = new QuickTip(treePanel);
            ToolTipConfig toolTipConfig = new ToolTipConfig();
            toolTipConfig.setDismissDelay(0);  //disable automatic hiding
            toolTipConfig.setHideDelay(800);
            toolTipConfig.setAnchor("top");
            toolTipConfig.setCloseable(true);
            quickTip.setToolTip(toolTipConfig);
            treePanel.setLabelProvider(new ModelStringProvider<OCODModel>() {
                @Override
                public String getStringValue(OCODModel model, String property) {
                    if (model.getTip() == null || model.getTip().equals(""))
                        return model.getHtml();
                    else                    
                        return "<span qtip='" + model.getTip() + "'>" + model.getHtml() + "</span>";
                }            
                
            });

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Nov 2010
    Posts
    209
    Vote Rating
    -2
    Ersmarker has a little shameless behaviour in the past

      0  

    Default


    Change
    quickTip.setToolTip(toolTipConfig);
    to
    quickTip.update(toolTipConfig)

    With setTooltip you are creating a new tooltip on your QuickTip component.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    sweetstian is on a distinguished road

      0  

    Default


    Yes, it works! That is what I was looking for.
    Thanks a lot, Ersmarker!

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    London
    Posts
    12
    Vote Rating
    0
    ozlemsimsek is on a distinguished road

      0  

    Default Tooltip for tree nodes

    Tooltip for tree nodes


    How can I do this (have tooltip for each node of tree item) if I am using a newer version of GXT. I am using GXT 3.0.1 and instead of treePanel, in this version tree class is used and it does not have a setLabelProvider method.I can use QuickTip, but how can I set qtip attribute of treenodes?ThanksOzlem

  5. #5
    Sencha User
    Join Date
    Apr 2013
    Posts
    27
    Vote Rating
    0
    kozla13 is on a distinguished road

      0  

    Default


    i am also trying with version 3.06