简体   繁体   English

需要帮助来查找与Winforms兼容的自定义工具提示控件

[英]Need Help Locating Winforms-compatible Custom Tooltip Control

在此处输入图片说明

I think this is a very smart control, does winForms have such a thing? 我认为这是一个非常聪明的控件,winForms有这样的东西吗?

Devexpress has a free ToolTipController class (as well as ErrorProvider and HintController classes) which you can get here: https://www.devexpress.com/Products/Free/NetOffer/ which provides exactly what you want. Devexpress有一个免费的ToolTipController类(以及ErrorProvider和HintController类),您可以在这里找到: https : //www.devexpress.com/Products/Free/NetOffer/提供了您想要的。 I use it on daily basis. 我每天都使用它。 You can simply drop a textbox onto the form and set its tooltip, tooltipcontroller, and tooltipicon properties as you wish (also you can use the validation event to display error messages as tooltips). 您可以简单地将文本框拖放到表单上,并根据需要设置其工具提示,工具提示控制器和工具提示图标属性(也可以使用验证事件将错误消息显示为工具提示)。

您正在寻找ToolTip组件

No, not out of the box. 不,不是开箱即用的。 There is a tooltip but it doesn't look like the one you show. 有一个工具提示,但看起来不像您显示的那样。

But you could make it by creating a custom control. 但是您可以通过创建自定义控件来实现。

我能想到的最接近的是错误提供程序控件

there is an error provider in winforms to do this but if you want to display like this you can use Tooltip 在winforms中有一个错误提供程序可以做到这一点,但是如果您要这样显示,可以使用工具提示

// Create the ToolTip and associate with the Form container. //创建工具提示并与Form容器关联。 ToolTip toolTip1 = new ToolTip(); ToolTip toolTip1 =新的ToolTip();

     // Set up the delays for the ToolTip.
     toolTip1.AutoPopDelay = 5000;
     toolTip1.InitialDelay = 1000;
     toolTip1.ReshowDelay = 500;
     // Force the ToolTip text to be displayed whether or not the form is active.
     toolTip1.ShowAlways = true;

     // Set up the ToolTip text for the Button .
     toolTip1.SetToolTip(this.button1, "My button1");

MSDN reference MSDN参考

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

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