comp • gb.qt4 • dialog • selectcolor

Dialog.SelectColor (gb.qt4)

Static Function SelectColor ( ) As Boolean

Calls the color standard dialog.

Returns TRUE if the user clicked on the Cancel button, and FALSE if the user clicked on the OK button.

This example set the background color of a form the color selected by the user. If the user cancels the dialog then the form color is not changed.

Examples

Public Sub ButtonColor_Click()
  Dialog.Color = Me.BackColor
  If Dialog.SelectColor() Then Return
  Me.BackColor = Dialog.Color
End