Hello.
It seems as if the propertygrid control cannot display property arrays. Is this the case?
When I do this :
And in the calling form I do this :Code:Imports System.ComponentModel Public Class comPicturePirate Private intAmountImages As Integer Private strWebURL As String Private strPageName As String Private strPageTitle As String Public lstOutPutImages As New List(Of Image) Public Sub New(ByVal pic As List(Of Image)) For index = 0 To pic.Count '- 1 ' Me.PB = pbn lstOutPutImages.Item(index) = pic.Item(index) Next End Sub <Description("Contained Images"), _ Category("Settings"), Browsable(True), Bindable(True)> _ Public Property Images(ByVal index As Integer) As Image Get Return lstOutPutImages.Item(index) End Get Set(ByVal value As Image) lstOutPutImages.Add(value) End Set End Property <Description("Website URL Where Image(s) Should Appear"), _ Category("Settings"), Browsable(True), Bindable(True)> _ Public Property WebURL(ByVal index As Integer) As String Get Return strWebURL(index) End Get Set(ByVal value As String) strWebURL = value End Set End Property <Description("Page Name Where Image(s) Should Appear"), _ Category("Settings"), Browsable(True), Bindable(True)> _ Public Property PageName(ByVal index As Integer) As String Get Return strPageName(index) End Get Set(ByVal value As String) strPageName = value End Set End Property <Description("Page Name Where Image(s) Should Appear"), _ Category("Settings"), Browsable(True), Bindable(True)> _ Public Property PageTitle(ByVal index As Integer) As String Get Return strPageTitle(index) End Get Set(ByVal value As String) strPageTitle = value End Set End Property <Description("Number Of Images Contained"), _ Category("Settings"), Browsable(True), Bindable(True)> _ Public Property AmountImages() As Integer Get Return intAmountImages End Get Set(ByVal value As Integer) intAmountImages = value End Set End Property End Class
It only shows the property named AmountImages - which is not a property array.Code:Private Sub btnPPCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPPCreate.Click Dim frmProps As New frmPPProperties Private arrOutPutImages As comPicturePirate arrOutPutImages = New comPicturePirate frmProps.prgPPProp.CommandsVisibleIfAvailable = True frmProps.prgPPProp.Text = "Images" frmProps.prgPPProp.SelectedObject = arrOutPutImages frmProps.Show() End Sub
I need to show the other propertyies as well, and I do not know how
Can anyone help please?




Reply With Quote