单击取消按钮上的删除/清除错误消息工具提示

时间:2022-09-30 21:04:16

I have referred this for creating error message tool tips, to be displayed continuously unless the error is resolved by the user. :: http://aralbalkan.com/1125 .....................

我已经提到这个用于创建错误消息工具提示,除非用户解决了错误,否则将连续显示。 :: http://aralbalkan.com/1125 .....................

But, this is being applied to a pop-up window visualized as a pop-up form.

但是,这被应用于可视化为弹出窗体的弹出窗口。

When the user clicks 'CANCEL' button, I want the error message tooltips if present to be cleared off from the screen. The message tool tips remains on the screen even if the CANCEL button is clicked.

当用户单击“取消”按钮时,我希望将错误消息工具提示(如果存在)从屏幕上清除。即使单击了CANCEL按钮,消息工具提示仍保留在屏幕上。

1 个解决方案

#1


The tooltips created are not linked to the dialog pop-up directly - i.e. they're not created as child widgets of the pop-up.

创建的工具提示不直接链接到对话框弹出窗口 - 即它们不是作为弹出窗口的子窗口小部件创建的。

To work around this you hook into the cancel button with an on-click hander, and have the handler loop through all elements in the errorMessageToolTips dictionary, hiding each one.

要解决这个问题,你可以通过点击操作挂钩到取消按钮,让处理程序循环遍历errorMessageToolTips字典中的所有元素,隐藏每一个元素。

Depending on your code structure, to avoid problems later on you may want to make the errorMessageToolTips dictionary specific to the pop-up and not a global array.

根据您的代码结构,为了避免以后出现问题,您可能希望使errorMessageToolTips字典特定于弹出窗口而不是全局数组。

#1


The tooltips created are not linked to the dialog pop-up directly - i.e. they're not created as child widgets of the pop-up.

创建的工具提示不直接链接到对话框弹出窗口 - 即它们不是作为弹出窗口的子窗口小部件创建的。

To work around this you hook into the cancel button with an on-click hander, and have the handler loop through all elements in the errorMessageToolTips dictionary, hiding each one.

要解决这个问题,你可以通过点击操作挂钩到取消按钮,让处理程序循环遍历errorMessageToolTips字典中的所有元素,隐藏每一个元素。

Depending on your code structure, to avoid problems later on you may want to make the errorMessageToolTips dictionary specific to the pop-up and not a global array.

根据您的代码结构,为了避免以后出现问题,您可能希望使errorMessageToolTips字典特定于弹出窗口而不是全局数组。