简体   繁体   English

Extjs网格中的重叠工具提示

[英]Overlapping tooltip in Extjs Grid

I have an issue that I've been trying to resolve. 我有一个一直在试图解决的问题。 I'm very new to Sencha ExtJS. 我是Sencha ExtJS的新手。 I've included image links to assist my explanation. 我提供了图片链接以帮助我进行说明。

I have a Tooltip that displays “Double-click to Configure” when you move your MouseOver the header of a table which works fine. 我有一个工具提示,当您将MouseOver移动到工作正常的表标题时,显示“双击配置”。

Shown here: http://img227.imagevenue.com/img.php?image=952843717_Header_122_41lo.jpg 此处显示: http : //img227.imagevenue.com/img.php?image=952843717_Header_122_41lo.jpg

Also I have a Tooltip that displays “Show Available Options” when you move your MouseOver the gear icon. 另外,当您将鼠标悬停在齿轮图标上时,我还有一个工具提示,显示“显示可用选项”。

The problem is that the gear icon is within the header so when you mouseover the gear icon, the header tooltip also displays displays. 问题在于齿轮图标位于标题内,因此当您将鼠标悬停在齿轮图标上时,标题工具提示也会显示。 Shown here http://img157.imagevenue.com/img.php?image=952937141_Config_122_421lo.jpg 此处显示http://img157.imagevenue.com/img.php?image=952937141_Config_122_421lo.jpg

I really don't know how EXTJS renders it's grid but is there a way for me to place the gear icon outside of the header or not display the “Double-click to Configure” Tooltip when a user mouseovers the gear icon? 我真的不知道EXTJS如何渲染它的网格,但是当用户将鼠标悬停在齿轮图标上时,有没有办法让我将齿轮图标放置在标题之外或不显示“双击以配置”工具提示?

I'm Not sure where to look in the code I have a file uiconstant.js that creates all the UI constants in a Static class 我不确定要在代码中查找哪里,我有一个uiconstant.js文件,该文件可在静态类中创建所有UI常量

UIElements:
{
    SIMULATION_GRID: 'simulationgrid',
    REPORT_SCHEDULER: 'reportscheduler',
    BLENDED_BENCHMARK: 'blendedBenchmark',
    BLENDED_BENCHMARK_GROUPINGS: 'blendedBenchmark_groupings',
    DEFAULT_CONTAINER_LABEL: 'Click to configure container',
    EDIT_CONFIGURE_CONTAINER_LABEL: 'Click to edit configuration',
    DO_NOT_REQUEST_CONTENT_LABEL: 'Automatic calculation off for this dashboard.',
    NO_RECORDS_FOUND: '<div class="no-records-found">No records found</div>',
    CONTAINER_PANEL: 'containerPanel',
    DoubleClickToConfigure: 'Double-click to Configure'
}

I also have a ContainerPanel.js File that Represents the custom panel for the container. 我也有一个ContainerPanel.js文件,它代表容器的自定义面板。 Not sure if I am looking in the correct files to make this change or update the grid 不知道我是否在寻找正确的文件来进行更改或更新网格

    Ext.create('Ext.tip.ToolTip', {
        target: header,
        html: UiConstant.UIElements.DoubleClickToConfigure

    });

Tooltip is supported for tools so you can configure the gear with a tooltip text. 工具支持工具提示,因此您可以使用工具提示文本配置齿轮。 Now, header does not directly support tooltips - you handle it above by creating one and setting its header. 现在,标头不直接支持工具提示-您可以通过创建提示并设置其标头来对其进行处理。

Let's try a bit different approach: tooltip on gear tool is de facto quicktip - only one instance of quicktip exists at a time. 让我们尝试一些不同的方法:齿轮工具上的工具提示实际上是quicktip-一次仅存在一个quicktip实例。

To create quicktip for the header do this: 要为标题创建quicktip,请执行以下操作:

panel.getHeader().getEl().set({'data-qtip':'Your text here'});

Note: There shall always be an area around the gear tool where the tooltip changes - not sure if it is acceptable for your use case. 注意:齿轮工具周围始终会有工具提示发生变化的区域-不确定是否适合您的用例。 Nevertheless, two tips shall not appear. 但是,不应出现两个提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM