PropertyGrid 컨트롤 사용법

네크 2014.07.22 22:14:24 *: Imports System.ComponentModel

Public Class clsProprties

Private m_Male As String
Private m_Female As String
Private m_Dog As String
Private m_Cat As String
Private m_DogColor As String
Public Sub New()
m_DogColor = "Black"
End Sub
<Category("People"),Description("Males are adult boys")>


Public Property Male() As String
Get
Return m_Male
End Get
Set(ByVal value As String)
m_Male = value
End Set
End Property
<Category("People"),Description("Females are adult girls")>

Public Property Female() As String
Get
Return m_Female
End Get
Set(ByVal value As String)
m_Female = value
End Set
End Property
<Category("Pets"),Description("Dogs Bark")>

Public Property Dog() As String
Get
Return m_Dog
End Get
Set(ByVal value As String)
m_Dog = value
End Set
End Property

<Category("Pets"),Description("Cats Meow")>

Public Property Cat() As String
Get
Return m_Cat
End Get
Set(ByVal value As String)
m_Cat = value
End Set
End Property


<[ReadOnly](True), Category("Pets"), Description("The Dogs Color is read only"), DisplayName("Dog Color")>
Public ReadOnly Property DogColor() As String
Get
Return m_DogColor
End Get
End Property


End Class

PropertyGrid 는 속성 탐색 콘트롤 입니다.

사용도 많이 되고 설명도 많으니 중요한 콘트롤 갔습니다. 

 

 

이번 영상은 기본적인 이해이고 2번째 활용은 다음시간에 올리겠습니다.

그대로 입력했으나 오류가 있습니다. 해결해주세요..