如何制作一个标签来显示在表单之外?

发布于 2024-09-26 06:26:55 字数 154 浏览 1 评论 0原文

由于 ToolTip 不能满足我的需要,因此我使用 C# 基于标签创建了自己的 ToolTip。我的问题是当我的工具提示太大时,标签会被表单剪切。标签显示在表单中,而不是显示在表单顶部。

我可以制作一个标签来显示在表单顶部,以使其比表单大并看到整个标签吗? 如果是的话怎么办!?

Since the ToolTip doesn't do what I need, I created my own based on a Label using C#. My problem is when my tooltip is too big, the Label is cut by the Form. The Label displays in the form and not on top of the form.

Can I make a Label to display on top of the Form to allow it to be bigger than the Form and see the entire Label?
If yes how!?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叶落知秋 2024-10-03 06:26:55

实现此目的的一种方法是仅使用单独的表单并将新表单(带有您的标签)放置在现有表单的顶部。

或者,您可以处理 SizeChanged标签的事件并将表单扩展为大于或等于标签的大小。

One way to accomplish this is to just use a separate form and place the new form (with your label) on top of the existing form.

Optionally, you could handle the SizeChanged event of the Label and expand your form to be greater than or equal to the size of the Label.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文