Results 1 to 6 of 6

Thread: Need help on tool tips

  1. #1
    Ext User
    Join Date
    Sep 2008
    Posts
    4
    Vote Rating
    0
      0  

    Default Need help on tool tips

    I I h I have some tooltip and tool bar questions, if anyone can give a hint, thanks in advance.

    1. How to add tooltip to a Ext.Panel collapse button, refer to the image in the attachment file.
    2. How to change the font of the tooltip text, refer to the image in the attachment file.
    3. How to add a "new mapfish.widgets.toolbar.Toolbar" to a "new Ext.Panel", the tool bar includes
    "new OpenLayers.Control.DragPan", "new OpenLayers.Control.ZoomBox" and more OpenLayers controls.
    Is this feasible?

    My attachment is too big to load to this forum, but it is the file called "tooltip.doc" in this link:
    http://n2.nabble.com/Need-help-on-to...td1118418.html

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    Answer to the first question:

    After the layout is rendered you could use:
    Code:
    panel.ownerCt.layout.west.miniSplitEl.dom.qtip = 'Tooltip';

  3. #3
    Ext User
    Join Date
    Sep 2008
    Posts
    4
    Vote Rating
    0
      0  

    Default

    Thanks lots Condor.

    I am just wondering what is "panel" in
    "panel.ownerCt.layout.west.miniSplitEl.dom.qtip = 'Tooltip';" ? Is it the west Panel I defined or just some general panel which comes from Ext JS system?

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    I answered using mail, but for other forum readers, here is an example showing tooltips on both collapseMode:'mini' and normal collapsible regions:

    Code:
    Ext.onReady(function() {
    	Ext.QuickTips.init();
    	new Ext.Viewport({
    		layout: 'border',
    		items: [{
    			region: 'west',
    			width: 200,
    			title: 'West',
    			split: true,
    			collapseMode: 'mini'
    		},{
    			region: 'center',
    			title: 'Center'
    		},{
    			region: 'east',
    			width: 200,
    			title: 'East',
    			split: true,
    			collapsible: true
    		}],
    		listeners: {
    			afterlayout: function(c) {
    				c.layout.west.miniSplitEl.dom.qtip = 'Click to collapse';
    				c.layout.west.getCollapsedEl();
    				c.layout.west.miniCollapsedEl.dom.qtip = 'Click to expand';
    				c.layout.east.panel.tools.toggle.dom.qtip = 'Click to collapse';
    				c.layout.east.getCollapsedEl().child('.x-tool-expand-east').dom.qtip = 'Click to expand';
    			},
    			single: true
    		}
    	});
    });

  5. #5
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    8
      0  

    Default

    A collapseQtip config seems like it would be useful (default to '').

    This is needed in that code?
    Code:
    c.layout.west.getCollapsedEl();

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    Quote Originally Posted by mjlecomte View Post
    A collapseQtip config seems like it would be useful (default to '').

    This is needed in that code?
    Code:
    c.layout.west.getCollapsedEl();
    Yes, otherwise miniCollapsedEl won't be created yet.

Posting Permissions

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