如何在窗体应用程序中自定义工具? [英] How to customize tools in window form application?
本文介绍了如何在窗体应用程序中自定义工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个窗口表单应用程序,因为我需要显示一个用户列表...我已经搜索了它的工具栏但是徒劳...可以任何人帮我清楚的例子吗?
解决方案
查看添加 DataGridView [ ^ ] - 它比你需要的更多,但它也可以应付基础知识。如果您在设计器中将其设置为具有单个列,并将RowHeadersVisible设置为false,则添加用户名是一件简单的事情:
MyDataGridViewWithUsers.Rows.Add( 用户名1);
MyDataGridViewWithUsers.Rows.Add( 用户名2);
MyDataGridViewWithUsers.Rows.Add( 用户名3);
MyDataGridViewWithUsers.Rows.Add( 用户名4);
Hi,I am developing a window form application in that i need to display a list of users...I have searched it for the toolbar but in vain...can any one help me with clear example??
解决方案
Look at adding a DataGridView[^] - it does a lot more than you need, but it can cope will with the basics too. If you set it up in the designer to have a single column, and set RowHeadersVisible to false, then it is a simple matter to add user names:
MyDataGridViewWithUsers.Rows.Add("User name 1"); MyDataGridViewWithUsers.Rows.Add("User name 2"); MyDataGridViewWithUsers.Rows.Add("User name 3"); MyDataGridViewWithUsers.Rows.Add("User name 4");
这篇关于如何在窗体应用程序中自定义工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文