WinForms:是否有将标签与文本框相关联的概念?

WinForms: Is there a concept of associating a label with a textbox?(WinForms:是否有将标签与文本框相关联的概念?)
本文介绍了WinForms:是否有将标签与文本框相关联的概念?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 C# 的 Visual Studio 2010.在 Windows 窗体开发中是否存在以某种方式将标签与文本框链接的概念?让他们作为一个整体一起移动的东西?在 ASP.NET 世界中,有标签控件的 AssociatedControlId 属性.我还想我记得 MS Access 表单设计器有某种方式将标签与控件关联(或链接).这个功能甚至存在于 Visual Studio 世界中吗?

I'm using Visual Studio 2010 with C#. Is there a concept in Windows Forms development of somehow linking a label with is text box? Something so that they move together as a unit? In the ASP.NET world, there is the AssociatedControlId property of the label control. I also think I remember MS Access form designer having some way of associating (or linking) labels with controls. Does this feature even exist in Visual Studio world?

如果不是,您如何将标签与控件分组,以便在移动文本框时也不必手动移动标签?

If not, how do you group labels with controls such that if you move a text box you don't have to manually move the label also?

推荐答案

不,没有 - 至少是开箱即用的控件.如果你想要这个,你可以使用用户控件来实现它.

No there is not - at least with the out of the box controls. If you want this you could achieve it with a user control.

一般来说,winforms 不像 HTML 那样是行驱动的.

In general the winforms is not line driven in the same way as HTML is.

这篇关于WinForms:是否有将标签与文本框相关联的概念?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)