Profile Picture

Iterating through available colors in NColorFillStyle

Posted By Marcus McCallum 12 Years Ago
Author
Message
Marcus McCallum
Posted 12 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61

Hi,

 

I have a shapeseries array, whose size gets calculated whilst the code is running. I am looking for a way to automatically arrange for each member of the array to have a different color. How do I iterate through the colors?

 

I have also tried to just iterate through the color.fromargb, but for some reason this just gives the same color for every member of the array.

For i = 0 To ALLSegments.GetUpperBound(0)

ALLSegments(i).Name = "Segment " & i

Dim RedValue As Integer

RedValue = i + 20

If RedValue > 255 Then

RedValue = 255

End If

ALLSegments(i).FillStyle = New NColorFillStyle(Color.FromArgb(50, RedValue, 255, 255))

Next

 

Does anyone have any ideas on this?

Thanks,

Marcus






Similar Topics


Reading This Topic