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
225
Problem creating controls with WinLayoutManager at runtime
posted

Hi,

I'm using Infragistics WinForms  2009.1 and I have problems to see any result on screen. I have a number of color in my palettes and I want to use the WinLayoutManager to arrange the color pallette. Here is my code:

Private Sub ShowPaletteColors(ByVal Palette As Palette)
upnlPaletteColors.ClientArea.Controls.Clear()

upnlPaletteColors.SuspendLayout()
For Each PaletteColor As PaletteColor In Palette.Colors.Values
Dim v As New Infragistics.Win.UltraWinEditors.UltraPictureBox
With v
.Appearance.BackColor = PaletteColor.Color
.Tag = PaletteColor
.Appearance.ForeColor = If(PaletteColor.Intensity > 127, Color.Black, Color.White)
End With
upnlPaletteColors.ClientArea.Controls.Add(v)
Next
upnlPaletteColors.ResumeLayout()
End Sub

So, for every color in the palette I want to insert a new UltraPictureBox in the ClientArea of the UltraPanel upnlPaletteColors. The code runs fine, but I don't see any result on screen.