タイトル : Re: UserControlでのプロパティの設定の仕方 投稿日 : 2004/07/09(Fri) 15:45 投稿者 : ファリンファリン
[OSのVer]:Windows [VBのVer]:VB.NET > [OSのVer]:WindowsXP Pro [VBのVer]:VB.NET2002 > UserControlを作成(基底クラスはUserControl)しているのですがプロパティの設定でこまっていま > す。 > ListBoxのItemsのようなプロパティを指定したいのですができません、どなたか教えてください! こんな感じでどうでしょうか?以下のコードをUserControlに埋め込んで見てください。 'ここはクラス定数宣言域で Private m_objItems As System.Windows.Forms.ListBox.ObjectCollection = _ New System.Windows.Forms.ListBox.ObjectCollection(New System.Windows.Forms.ListBox()) 'これがプロパティの記述 Public Property Items() As System.Windows.Forms.ListBox.ObjectCollection Get Return m_objItems End Get Set(ByVal Value As System.Windows.Forms.ListBox.ObjectCollection) m_objItems = Value End Set End Property |