创建自定义的工具提示C# [英] create custom tooltip C#

查看:143
本文介绍了创建自定义的工具提示C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个自定义的工具提示,用不同的风格,这样,当我在控制点击(例如标签或用户控制)时出现。

I want to create a custom tooltip, with a different style so that when I click on a control (for example a label or a user-control) it appears.

东西类似于谷歌在谷歌地图确实为坐标。

Something similar to what Google does in Google Maps for coordinates.

我试图创建一个用户控件,并显示在用户的标签上点击,但它没'T工作。结果

I tried to create a user-control and show it when user clicked on a label, but it didn't work well.

的WinForms

我附加的我想要的东西的图片。谢谢你在前进!

I attached a picture of what I want. Thank you in advance!

推荐答案

使用一个标准的工具提示,但覆盖的绘画方法,因此可以出现你想要它,同时仍然表现得像一个正常的工具提示。

Use a standard ToolTip but override the painting method so it can appear as you want it, while still behaving like a normal tool tip.

有没有这样做过,所以我不能提供一个例子

Haven't done this before so I can't provide an example.

编辑:这里是一个例如: http://cboard.cprogramming.com/csharp-programming/119414-custom-tooltip。 HTML

here is an example: http://cboard.cprogramming.com/csharp-programming/119414-custom-tooltip.html

这篇关于创建自定义的工具提示C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆