Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1185
Inheriting a WinComboEditor
posted

Hi

I'm trying to create various inherited WinComboEditors with predefined item lists so that I can easily reuse them on my forms

I have done so, but am finding that the item lists are doubling and tripling up their contents on the final form 

When I examine the designer code of the hosting form I see the list elements created again. making changes to this only compounds the error

any help would be gratefully recieved

here is the component code to aid in recreating;

<

Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

Partial

 

Class ipUltraComboEditorYesNo

 

Inherits Infragistics.Win.UltraWinEditors.UltraComboEditor

 

'Control overrides dispose to clean up the component list.

<System.Diagnostics.DebuggerNonUserCode()> _

 

Protected Overrides Sub Dispose(ByVal disposing As Boolean)

 

Try

 

If disposing AndAlso components IsNot Nothing Then

components.Dispose()

 

End If

 

Finally

 

MyBase.Dispose(disposing)

 

End Try

 

End Sub

 

'Required by the Control Designer

 

Private components As System.ComponentModel.IContainer

 

' NOTE: The following procedure is required by the Component Designer

 

' It can be modified using the Component Designer. Do not modify it

 

' using the code editor.

<System.Diagnostics.DebuggerStepThrough()> _

 

Private Sub InitializeComponent()

 

Dim ValueListItem1 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItem

 

Dim ValueListItem2 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItem

 

CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()

 

Me.SuspendLayout()

 

'

 

'ipUltraComboEditorYesNo

 

'

 

Me.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList

ValueListItem1.DataValue =

"ValueListItem0"

ValueListItem1.DisplayText =

"Yes"

ValueListItem2.DataValue =

"ValueListItem1"

ValueListItem2.DisplayText =

"No"

 

Me.Items.AddRange(New Infragistics.Win.ValueListItem() {ValueListItem1, ValueListItem2})

 

Me.LimitToList = True

 

CType(Me, System.ComponentModel.ISupportInitialize).EndInit()

 

Me.ResumeLayout(False)

 

End Sub

End

 

Class

Parents Reply Children
No Data