gpt4 book ai didi

c# - 如何将可编辑的组合框添加到 System.Windows.Forms.PropertyGrid?

转载 作者:太空狗 更新时间:2023-10-29 21:02:29 25 4
gpt4 key购买 nike

我有一个具有不同类型值的 System.Windows.Forms.PropertyGrid。对于特定项目,我想显示一个有用值列表以供选择。用户也可以键入一个新值。类似于传统下拉组合框的东西:

enter image description here

到目前为止,我有自己的 System.ComponentModel.TypeConverter,但我不知道如何获得带有建议值的下拉列表直接编辑值。请帮忙!

最佳答案

您可以通过实现自己的 UITypeEditor 来完成此操作.

我推荐阅读 Getting the Most Out of the .NET Framework PropertyGrid Control .特别是标题为 Providing a Custom UI for Your Properties 的部分演练如何为特定属性制作自定义控件。

关于c# - 如何将可编辑的组合框添加到 System.Windows.Forms.PropertyGrid?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9790188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com