ExtJS 4.2:工具提示不够宽,不能看到内容 [英] ExtJS 4.2: ToolTips not wide enough to see contents
问题描述
我注意到,升级到ExtJS 4.2时,当文本框出现错误时显示的工具提示不够宽,不能看到工具提示的内容 - 它们总是似乎是40px宽。
I've noticed since upgrading to ExtJS 4.2 that tooltips displayed when a textfield has an error in it are not wide enough to see the contents of the tooltip - they always seem to be 40px wide.
这是一个显示问题的测试案例:
Here's a test case which shows the problem:
<html>
<head>
<title>Field error tooltips</title>
<link rel="stylesheet" type="text/css" href="ext-4.2.0/resources/css/ext-all.css">
<script type="text/javascript" src="ext-4.2.0/ext-all-debug.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
var form = Ext.create("Ext.form.Panel",{
title: 'My form',
width: 300,
height: 100,
items: [
{xtype: 'textfield', name: 'FIELD1', fieldLabel: 'Field 1', allowBlank: false}
],
renderTo: Ext.getBody()
});
});
</script>
</body>
</html>
在上述示例中,如果您单击该字段,然后单击它,而不输入任何内容,则显示一个工具提示说它不允许为空白。该工具提示不够宽,不能看到消息。有没有人碰过这个?
In the above example if you click the field and then click out of it without typing anything, it shows a tooltip saying that it's not allowed to be blank. The tooltip is not wide enough to see the message unfortunately. Has anyone else come across this?
谢谢!
推荐答案
谢谢对于帮助家伙,但是我在sencha论坛上找到了一个似乎有效的解决方案:
Thanks for the help guys, but I found a solution on the sencha forum which seems to work:
http://www.sencha.com/论坛/ showthread.php?260106 - 工具提示和网格不调整大小的文本/ page3#24
具体的应用程序开头的以下代码:
Specifically the following code at the beginning of the app:
delete Ext.tip.Tip.prototype.minWidth;
这篇关于ExtJS 4.2:工具提示不够宽,不能看到内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!