View Full Version : Ext.tip.ToolTip alignment issue in a specific case

Shafaq kazmi
28 Oct 2013, 1:40 AM

I'm facing an issue in using Ext.tip.Tooltip (Version: Extjs: I have created a tip and below is the code:

mouseover: function (view, func){
var toolTip = Ext.create('Int.tip.PersistentToolTip',{

target: func,

html: func.getAttribute('tipData'),

id: 'clause-tool-tip',
maxHeight: 400,
width: 370,
anchor: 'left',
mouseOffset: [-5, -4]

toolTip .show();

I have set the tip property anchor:'left' which works fine for normal case but to adjust the tip position anchor move to bottom instead of left incase of long tips. Is there any solution that anchor remains 'left' and tip will show on right. (Currently it moves to top)


I hope you get the problem :-/ Can any one please help me in this regard.

28 Oct 2013, 3:51 AM
What's your alignment string? If it contains '?' at the end, tip's position will be constrained to window.

Shafaq kazmi
28 Oct 2013, 4:22 AM
I didn't get alignment string point. My code is attached you can check it from there. My anchor is left and I just want to keep tip position right instead of top as it hides my target point.

28 Oct 2013, 11:23 AM
You may want to turn this (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.tip.ToolTip-cfg-constrainPosition) off.

Shafaq kazmi
28 Oct 2013, 9:46 PM
Hi ettavolt

It's almost solved the problem but now the issue is tip is cutting. Can I move it to center in this case? Please see the attached image.


Thank you for the help.

3 Nov 2013, 9:36 AM
I'm afraid you will need to override some alignment method of tip, if you want it to constraint only along one axis.