|
''' <summary>
''' Provides a type editor for the AnalogClock.Element array objects.
''' </summary>
<DebuggerNonUserCode()> _
Public Class ElementArrayEditor
Inherits System.ComponentModel.Design.ArrayEditor
#Region " Methods "
Sub New(ByVal arrayType As Type)
MyBase.New(arrayType)
End Sub
Protected Overrides Function CreateCollectionForm() As System.ComponentModel.Design.CollectionEditor.CollectionForm
Dim form As System.ComponentModel.Design.CollectionEditor.CollectionForm = MyBase.CreateCollectionForm()
form.StartPosition = FormStartPosition.CenterParent
Dim ctrl As Control = form.Controls("overArchingTableLayoutPanel")
' Disables Add/Remove buttons
ctrl.Controls("addRemoveTableLayoutPanel").Enabled = False
' Get a reference to the private fieldtype propertyBrowser
' This is the propertgrid inside the collectionform
Dim fInfo As Reflection.FieldInfo = form.GetType.GetField("propertyBrowser", _
Reflection.BindingFlags.NonPublic _
Or Reflection.BindingFlags.Instance)
If fInfo IsNot Nothing Then
' get a reference to the propertygrid instance located on the form
Dim pGrid As PropertyGrid = CType(fInfo.GetValue(form), PropertyGrid)
If pGrid IsNot Nothing Then
' Make the help/description visible
pGrid.HelpVisible = True
End If
End If
Return form
End Function
Protected Overrides Function CanSelectMultipleInstances() As Boolean
Return True
End Function
#End Region
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.