我如何在C#的面板上显示网格?需要帮助! [英] How can i show grids on a panel in c# ? help Required !

查看:82
本文介绍了我如何在C#的面板上显示网格?需要帮助!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C#窗口表单应用程序的面板上绘制网格吗? ; P

i want to draw a grid on a panel in c# window form application ? ;P

推荐答案

重写Panel Paint事件,并使用e.Graphics.DrawLine绘制网格. 否则,如果要显示网格控件,请在设计时将其放到面板上,或者在运行时将其添加到Panel.Controls集合中.
Override the Panel Paint event, and use e.Graphics.DrawLine to draw the grid.
Otehrwise, if you want to show a grid control, either drop it onto the panel at design time, or add it to the Panel.Controls collection at run time.


这篇关于我如何在C#的面板上显示网格?需要帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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