************************************************** *-- Class: colouredcheckbox (e:\foxexamples\checkbox\colouredcheckbox.vcx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 07/07/11 09:32:08 PM *-- Author: OnyToo DEFINE CLASS colouredcheckbox AS form Top = 0 Left = 0 Height = 126 Width = 199 DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT check1 AS checkbox WITH ; Top = 24, ; Left = 24, ; Height = 17, ; Width = 60, ; AutoSize = .T., ; Alignment = 0, ; BackStyle = 0, ; Caption = "Check1", ; Value = 0, ; Visible = .T., ; BackColor = RGB(255,0,0), ; Name = "Check1" PROCEDURE Paint lnForeColor = This.ForeColor lnDrawWidth = This.DrawWidth This.DrawWidth = 2 With This.Check1 This.ForeColor = .BackColor This.Box(.Left, .Top+2, .Left+13, .Top+15) If !Empty(.Value) This.Line(.Left+4, .Top+8, .Left+6, .Top+12) This.Line(.Left+6, .Top+12, .Left+9, .Top+5) Endif Endwith This.DrawWidth = lnDrawWidth This.ForeColor = lnForeColor ENDPROC PROCEDURE check1.InteractiveChange If Empty(This.Value) This.BackColor = Rgb(0,0,255) Else This.BackColor = Rgb(255,0,0) Endif ENDPROC ENDDEFINE * *-- EndDefine: colouredcheckbox **************************************************Maybe his coding is a good starter for your problem.