NNKL.COM
welcome to my space
X
Search:  
 HOME   Adding tooltip in a tree?
Adding tooltip in a tree?
Published by: mike 2009-01-07
Welcome to:nnkl.com

  • MyHeritage Family Tree Builder: Tutorial::
    File Format: PDF/Adobe Acrobat - View as HTMLIn addition, tooltips throughout Family Tree Builder provide a concise textual .. old photos, adding them to your project on Family Tree Builder and
    http://www.myheritage.com/FP/FamilyTreeBuilder/Tutorial.pdf
    HOME
    Hi I am doing a basic tree static, and I would like to add a tooltip in each leaf of tree, I am adding the tooltip and don't work al little helps is welcome

    var treePanel = new Ext.Panel({
    frame:true,
    title: 'Person',
    collapsible:true,
    titleCollapse: true,
    collapsed: false,
    items:[ new Ext.tree.TreePanel({
    loader: new Ext.tree.TreeLoader(),
    rootVisible:false,
    lines:false,
    autoScroll:true,
    root: new Ext.tree.AsyncTreeNode({
    children:[{
    text: 'Staff',
    iconCls:'category-list',
    tooltip: 'Browse the Staff',
    leaf:true
    },{......

    regards
    Frank


  • Weird behaviour I set qtip in the leaf and always don't appear the tip when the mouse is over the leaf, the only tips that appear is in the first leaf of tree and it isn't always, am I missing something?

    Note: the test was done with IE6 and FF 2.0.09 and the same behaviour, the tree is inside a panel, west region inside a windows

    createWindow : function() {
    debugger;
    Ext.QuickTips.init()
    var desktop = this.app.getDesktop();
    var win = desktop.getWindow('Manager-win');
    if (!win) {
    var treePanel = new Ext.Panel({
    frame:true,
    title: 'Person Manager',
    collapsible:true,
    titleCollapse: true,
    collapsed: false,
    items:[ new Ext.tree.TreePanel({
    loader: new Ext.tree.TreeLoader(),
    rootVisible:false,
    lines:false,
    autoScroll:true,
    root: new Ext.tree.AsyncTreeNode({
    children:[{
    text: 'Staff',
    iconCls:'category-list',
    qtip: 'Browsing, create & edit staffs',
    leaf:true
    },{
    text: 'Client',
    iconCls:'category-list',
    qtip: 'Browsing, create & edit clients',
    leaf:true
    },
    {
    text: 'Supplier',
    iconCls:'category-list',
    qtip: 'Browsing, create & edit supplier',
    leaf:true
    },
    ..............................................

    var partyWestPanel = new Ext.Panel({
    id:'party-west-panel',
    region:'west',
    split:true,
    autoScroll:true,
    collapsible: true,
    collapseMode: 'mini',
    width:230,
    minWidth: 150,
    border: false,
    baseCls:'x-plain',
    items: [treePanel]

    });

    .........

    regards
    Frank


  • Frank, could you please post the complete code so I can drop it to examples, run and test it here?


  • I think you want qtip


  • Yes, qtip will work. You also need to call Ext.QuickTips.init() early in your code.


  • Frank -

    It appears like there is a missing " on the link which you have placed in the text attribute of your TreeNode. This may be causing your issue. I'm curious to know why you want to place a actual anchor tag in your treenode instead of just using the click event?
  • Mailing list archives::
    Subject, Re: [jira] Resolved: (TOBAGO-194) Tooltip in tree and treeListbox. Date , Wed, 07 Feb 2007 12:41:29 GMT. How does it works. Have you an example.
    http://mail-archives.apache.org/mod_mbox/myfaces-dev/200702.mbox/<8844682.post@talk.nabble.com>
    HOME


  • Frank -

    You said:

    the only tips that appear is in the first leaf of tree


    Do you mean the qtip only shows up on the Staff node and not the Client or Supplier node?

    Or did you want all of the children nodes to also show the qtip of their parent?

    If so I would reset the baseAttrs each time you load a different node like so:

    theTreeLoader.on("beforeload", function(treeLoader, node) {
    this.baseAttrs = {qtip: node.attributes.qtip};
    }, this);


  • Sorry, I don't wrote some details important and I think the problem is there:

    children:[{
    //text: 'Staff', using only text appear ok the qtip
    text: 'Staff', //using the html only appear the qtip in the first char, I mean S
    iconCls:'category-list',
    qtip: 'Browsing, create & edit staffs',
    leaf:true
    }.......

    doubts:
    to do some action when the user click on a leaf in the tree I did it:

    var ab = partyWestPanel.body;
    ab.on('mousedown', this.doAction, null, {delegate:'a',ctx:this});
    ab.on('click', Ext.emptyFn, null, {delegate:'a', preventDefault:true});

    the tree is inside the PartyWestPanel,

    addPanels: function(win) {
    showTab(win)
    },
    doAction: function (e, t, od) {
    od.ctx.addPanels(t.id);
    e.stopEvent();

    },
    it work ok, the method showTab is trigger, but don't appear the qtip in the tree, so is there other way to do some action and appear the qtip in the tree?

    regards
    Frank





  • I Am a Sinner – What About You?
    Global Sourcing and Supplier Online by Dylan

    You are looking at:nnkl.com's Adding tooltip in a tree?, click nnkl.com to home
  • what is bad credit uk
  • 10 ways to save on car insurance
  • 16 mantras for building financial wealth
  • long term care insurance low cost alternatives for budget conscious seniors
  • how to get started in preconstruction investing
  • investing in car dealerships doing your homework
  • selling your home be sure it shows well
  • 7 ways to consolidate your debt
  • are you a stockaholic
  • choosing an estate agent
  • home loans for people with bad credit when you should wait and when you should
  • fast cash loans when you should borrow and when you should wait
  • i want to buy a home now what
  •  
  • 5 home buying essentials
  • real estate web design 3 items you must include on your site
  • the basics of finding a loan for people with bad credit
  • bad credit history ow financing and buying a home can help you improve your fi
  • compare payday loan or cash advance lenders online before you borrow
  • home mortgages does a no closing cost loan make sense for you
  • bankruptcy chapters explained
  • mortgage loans for people with adverse credit how much should you borrow
  • a guide to bad credit finance options
  • the five most popular questions about bankruptcy
  • a borrowers guide to bad credit loans uk
  • big brother knows whats in your credit report how about you
  • car insurance monitoring for discounted insurance rates privacy devouring mons
  • finding false gold in penny stock
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 nnkl.com        Site made:CFZ