Either of the following two options will fit on a menubar,
toolbar or button. The first reads the current screen color
and changes it to white and then back again. It works
better and faster than refresh()/resynch() in some instances.
The second fills an array that you can use to set the current screen color.
'Script to cleanup the parentform after
'a refresh fails with a popup or dropdown menu.
'Get the parent form's current color
'and save it in a variable "colornow"
'Then temporarily change the color to white
'and reset the color to its original state.
'If the original is white, change to grey
'then back to white.
''XBasic
'--------------------------------------------
colornow = parentform.fill.forecolor
if colornow = "white"
parentform.fill.forecolor=("grey")
parentform.fill.forecolor=(colornow)
end
end if
parentform.fill.forecolor=("white")
parentform.fill.forecolor=(colornow)
end
'Fills the color array and then sorts the values
'to display.
'-----------------------------------------------------------------
DIM color[20] AS C
Color[1] = "Black"
Color[2] = "White"
Color[3] = "Red"
Color[4] = "Blue"
Color[5] = "Green"
Color[6] = "Cyan"
Color[7] = "Yellow"
Color[8] = "Magenta"
Color[9] = "Dark Red"
Color[10] = "Dark Blue"
Color[11] = "Dark Green"
Color[12] = "Dark Cyan"
Color[13] = "Dark Yellow"
Color[14] = "Dark Megenta"
Color[15] = "Gray"
Color[16] = "Dark Gray"
Color[17] = "Grey"
Color[18] = "Wintext"
Color[19] = "Win3D"
Color[20] = "Buttontext"
sort_array("color")
FOR i = 1 TO 20
trace.writeln(color[i])
NEXT i
result = ui_get_list_array("Select Color",1,"color")
if result "" then
parentform.fill.forecolor=(result)
end if
toolbar or button. The first reads the current screen color
and changes it to white and then back again. It works
better and faster than refresh()/resynch() in some instances.
The second fills an array that you can use to set the current screen color.
'Script to cleanup the parentform after
'a refresh fails with a popup or dropdown menu.
'Get the parent form's current color
'and save it in a variable "colornow"
'Then temporarily change the color to white
'and reset the color to its original state.
'If the original is white, change to grey
'then back to white.
''XBasic
'--------------------------------------------
colornow = parentform.fill.forecolor
if colornow = "white"
parentform.fill.forecolor=("grey")
parentform.fill.forecolor=(colornow)
end
end if
parentform.fill.forecolor=("white")
parentform.fill.forecolor=(colornow)
end
'Fills the color array and then sorts the values
'to display.
'-----------------------------------------------------------------
DIM color[20] AS C
Color[1] = "Black"
Color[2] = "White"
Color[3] = "Red"
Color[4] = "Blue"
Color[5] = "Green"
Color[6] = "Cyan"
Color[7] = "Yellow"
Color[8] = "Magenta"
Color[9] = "Dark Red"
Color[10] = "Dark Blue"
Color[11] = "Dark Green"
Color[12] = "Dark Cyan"
Color[13] = "Dark Yellow"
Color[14] = "Dark Megenta"
Color[15] = "Gray"
Color[16] = "Dark Gray"
Color[17] = "Grey"
Color[18] = "Wintext"
Color[19] = "Win3D"
Color[20] = "Buttontext"
sort_array("color")
FOR i = 1 TO 20
trace.writeln(color[i])
NEXT i
result = ui_get_list_array("Select Color",1,"color")
if result "" then
parentform.fill.forecolor=(result)
end if