PDA

View Full Version : QuickTip on minWidth when only qtitle set


jsakalos
04-20-2007, 01:35 PM
Sometimes I need QuickTips which have quite long qtitle but no/short qtip.

The text of qtitle is shown on multiple lines in this case and if longer words are used (e.g. Internationalization) the text of qtitle flows out of the frame of the QuickTip.

If there is no qtip text the width is set to minWidth ignoring the qtitle text whatsoever.

I have looked in source and the sizing logic takes into account only qtip content but not qtitle.

jack.slocum
04-20-2007, 07:58 PM
You can specify a width or, probably a better solution is to not use qtitle and instead just add the title on the top of the tip body.

The title is in a block element so it auto expands and does support the same measuring cross browser (particularly in IE).

jsakalos
04-20-2007, 09:32 PM
Hi Jack,

I have tried to specify width but I have many tips on the page and each has different title. These are names of posts in an organization so somewhere I have "Director of Production Resources" and somewhere I have "Seller".

The most feasible seems to simulate the title in the tooltip body.

Nevertheless, it would be useful option (autoWidth?) that would turn off the width calculation logic.

I'll put all content in the body for now.

jack.slocum
04-21-2007, 07:29 AM
Also cannot do autoWidth because of IE. :( If it worked I would have left it autoWidth from the start. :)

jsakalos
04-21-2007, 10:28 AM
I understand. I just ment an option autoWidth (default false). IE user would'n be impacted and you could turn it on if you want.

I'm developing closed-user-group application so I can force them to use FF. ;)

tobiu
06-29-2007, 03:16 PM
hi you two,

i also had this bug today in firefox.

when i create qtips manually like (example)

<img ext:qtip="English" src="images/flags/' + flagName + '.png">

it works fine, when the side is loaded first time.

as soon as i replace dom-nodes via ajax, where new nodes like this image are inserted, the q-tips display with min. width.

kind regards, tobiu

@edit: just found

You can also set the width on the element:

<img ext:qtip="Foo" ext:width="75" />

The full list of attributes:

qtip - the html for the tip
width - the width for the tip
qtitle - the title for the tip
hide - false to disable auto hide and put a close X on it
cls - add a class to the tooltip container

All these attribute names and the namespace can be customized via Ext.QuickTips.tagConfig
__________________
Jack Slocum
Ext JS - Core Development Team
jack@extjs.com

that helped for now.