<Category("data"), DefaultValue(""), Description("右欄リストに格納されたレコード"), _ NotifyParentProperty(True)> _ Public ReadOnly Property SelectedItems() As ListItemCollection Get Return mSubListBoxDataTo.Items End Get End Property
不是系统的,如下: <Category("data"), DefaultValue(""),NotifyParentProperty(True)> _ Public ReadOnly Property SelectedItems() As ListItemCollection Get Return mSubListBoxDataTo.Items End Get End Property我现在要的是不可以设置!
NotifyParentProperty(True)> _
Public ReadOnly Property SelectedItems() As ListItemCollection
Get
Return mSubListBoxDataTo.Items
End Get
End Property
我想如果继承了那么你所说的Items应该是系统的吧!
你现在要的是可以设置还是不可以设置呀???
<Category("data"), DefaultValue(""),NotifyParentProperty(True)> _
Public ReadOnly Property SelectedItems() As ListItemCollection
Get
Return mSubListBoxDataTo.Items
End Get
End Property我现在要的是不可以设置!
2,你是不是已经把异常处理过了正常看这个属性是不能写入的
是不是ListItemCollection这个就会有这种问题啊?
设置成只读的话,你在设计的时候确认可以设置的,但是运行的时候就会有还原成默认的,
比如ID,你改了ID,但是一运行就是原来的ID了,你试试呢??
{
set
{
//可写
}
get
{
//可读
}
}
如果只读的话应该是这样
public string Man
{
set
{
//可写
}
}
加入 Browsable(false)