如何制作一个标签来显示在表单之外?
由于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实现此目的的一种方法是仅使用单独的表单并将新表单(带有您的标签)放置在现有表单的顶部。
或者,您可以处理 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.