Property in user control

  • Thread starter Thread starter saeed rezaei
  • Start date Start date
S

saeed rezaei

how i can write some property form mycontrol that's can be expend.
when i use this cod :
property MyProp as integer
....
....
....
end property
its only add one property to my control
but there are some property thats are has + in left side.
for example Font Or Margin property
 
You need to specify the ExpandableObjectConvertor using the TypeConvertor
attribute to your property.

However,since the type of your property is int, it will not be expandable.
In this case, you can derive your own class from TypeConvertor and override
the GetPropertiesSupported and GetProperties method. Than specify this
derived class in the TypeConvertor attribute.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 
saeed said:
how i can write some property form mycontrol that's can be expend.
...
for example Font Or Margin property

The property needs to return an Object that contains the "inner"
properties, as in

Class c1
Property myProp As c2
...
Return New Class2(Me)
...
End Property

Public Sub Class2
Friend Sub New( c1 as Class1 )
End Sub
Public Property Left() As Integer
...
End Property
Public Property Top() As Integer
...
End Property
End Class
End Class

HTH,
Phill W.
 
Back
Top