### Standardcolor ComboBox

Example of a ComboBox listing the Standard Colors as defined in the jFX library.
Define the ComboBox
`Sub Process_Globals
Private cbStandardColors As ComboBox
End Sub`
Init the ComboBox Items
cbStandardColors.Items.AddAll(Array("Black","Blue","Cyan","DarkGray","Gray","Green","LightGray","Magenta","Red","Transparent","White","Yellow"))
Handle the ComboBox SelectedIndex Change Event
`Sub cbStandardColors_SelectedIndexChanged(Index As Int, Value As Object)
Dim result As String
Dim color As String = Value
If color.EqualsIgnoreCase("Black") Then result = fx.Colors.Black
If color.EqualsIgnoreCase("Blue") Then result = fx.Colors.Blue
If color.EqualsIgnoreCase("Cyan") Then result = fx.Colors.Cyan
If color.EqualsIgnoreCase("DarkGray") Then result = fx.Colors.DarkGray
If color.EqualsIgnoreCase("Gray") Then result = fx.Colors.Gray
If color.EqualsIgnoreCase("Green") Then result = fx.Colors.Green
If color.EqualsIgnoreCase("LightGray") Then result = fx.Colors.LightGray
If color.EqualsIgnoreCase("Magenta") Then result = fx.Colors.Magenta
If color.EqualsIgnoreCase("Red") Then result = fx.Colors.Red
If color.EqualsIgnoreCase("Transparent") Then result = fx.Colors.Transparent
If color.EqualsIgnoreCase("White") Then result = fx.Colors.White
If color.EqualsIgnoreCase("Yellow") Then result = fx.Colors.Yellow
'
Log("Color Selected = " & result)
End Sub`
Note
Assign the color selected to a global string var if to be used in other subs.

Changed: , Category: Colors, File: T6C174M1263.htm, ID: 1263