以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 狐表属性窗口控件 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=75467) |
-- 作者:cyl123 -- 发布时间:2015/10/9 12:22:00 -- 狐表属性窗口控件 请教大红袍老师,狐表的属性窗口控件是PropertyGrid控件吗, 狐表是vb.net开发的,在狐表上能自定义设计PropertyGrid控件吗?有没相关教程推荐?
|
-- 作者:大红袍 -- 发布时间:2015/10/9 12:34:00 -- 动态添加控件,参考
Dim rtxt As New Windows.Forms.RichTextBox |
-- 作者:cyl123 -- 发布时间:2015/10/9 13:48:00 -- 大红袍老师,回答错了吧 |
-- 作者:Hyphen -- 发布时间:2015/10/9 14:55:00 -- 道理是一样的。 |
-- 作者:大红袍 -- 发布时间:2015/10/9 14:59:00 -- 全局代码,要设置什么属性,在这里面设置
Public Class Demo
#Region "Private Variables " Private bLocked As Boolean = True Private dtCreateDate As Date Private strFilePath As String Private strFolderPath As String #End Region
#Region "Public Properties" Public Property Locked() As Boolean Get Return bLocked End Get Set(ByVal value As Boolean) bLocked = value End Set End Property
Public Property CreatDate() As Date Get Return dtCreateDate End Get Set(ByVal value As Date) dtCreateDate = value End Set End Property
Public Property FilePath() As String Get Return strFilePath End Get Set(ByVal value As String) strFilePath = value End Set End Property
Public Property FolderPath() As String Get Return strFolderPath End Get Set(ByVal value As String) strFolderPath = value End Set End Property
#End Region
End Class
调用代码
Dim pgd As New Windows.Forms.PropertyGrid
参考 http://blog.csdn.net/naive1010/article/details/1745047
|
-- 作者:cyl123 -- 发布时间:2015/10/9 16:53:00 -- 再请教大红袍老师,狐表编辑设计窗口,原理是怎样的?没什么别意思,就是想了解下,涨点知识。 |
-- 作者:大红袍 -- 发布时间:2015/10/9 16:59:00 -- 封装一下控件,然后直接new一个控件放在设计器那里即可。设置后,就保存各个控件的数据。 |