我可以创建自定义“属性页”吗?对于自定义控件的属性? [英] Can I create a custom "property page" for a custom control's property?

查看:75
本文介绍了我可以创建自定义“属性页”吗?对于自定义控件的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有什么:

Visual Basic 2015,WinForms

Visual Basic 2015, WinForms

我的问题:

我正在创建自定义控件 - 两者都是"扩展"的控件(
从现有控件继承)和UserControls(使用组成控件)。我知道一些控件'具有在设计时访问时调用"属性页"的属性。专门用于管理
特定属性(通常是"复杂"对象属性)的对话框。我的问题是,在为我的某个控件创建自定义属性时,我可以将其设置为使用我为其设计的
自定义属性页 - 并且如何我可以这么做吗?

I'm creating custom controls--both "extended" controls (which inherit from existing controls) and UserControls (which use constituent controls). I know that some controls' have properties that, when accessed at design time, invoke a "property page" dialog box specially designed for managing a particular property (usually "complex" object properties). My question is, can I, when creating a custom property for one of my controls, set it up to use a custom property page that I design for it--and how might I do that?

Robert Gustafson

Robert Gustafson

推荐答案

我有什么:

Visual Basic 2015,WinForms

Visual Basic 2015, WinForms

我的问题:

我偶尔会创建自定义控件 - 两者都是"扩展"的从现有控件继承的控件,以及依赖于组件控件的UserControls。在任何一种情况下,我有时会有一个属性,我想连接到自定义的"属性
页面"在设计时分配。有没有办法做到这一点,如果是这样,怎么样? (我希望能够设计我自己的属性页面。)

I occasionally create custom controls--both "extended" controls which inherit from existing ones, and UserControls which rely on constituent ones. In either case, I sometimes have a property that I'd like to wire up to a custom "property page" for assigning it at design time. Is there a way to do this, and if so, how? (I'd like to be able to design my own property page specific to my property.)

PS。我之前尝试发布这个,我不知道我是否成功。

PS. I tried to post this before, and I don't know if I succeeded.


这篇关于我可以创建自定义“属性页”吗?对于自定义控件的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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