Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 Tags
Subject: Coloring / Highlighting Check Box
Thread ID: 395784 Message ID: 395784 # Views: 98 # Ratings: 2
Version: Visual FoxPro 9 Category: Forms
Date: Sunday, January 19, 2014 4:00:31 PM         
   


Further to my Message ID: 395778, going through archives I can't help being amazed by some "simple tricks" in old postings - effective learning by examples ...eg. here is one from Yousfi Benameur back in 2011 for changing color of a check box. .. Am re-posting just in case any one has a need for it.
publi yform
yform=createObject("asup")
yform.show(1)
return
DEFINE CLASS asup AS form
	Top = 104
	Left = 133
	Height = 92
	Width = 150
        autocenter=.t.
	BorderStyle = 0
	Caption = ""
	HalfHeightCaption = .T.
	MaxButton = .F.
	Name = "form1"

	ADD OBJECT check1 AS checkbox WITH ;
		Top = 12, ;
		Left = 24, ;
		Height = 24, ;
		Width = 84, ;
		Alignment = 0, ;
		BackStyle = 0, ;
		Caption = "Check1", ;
		Value = 1, ;
		Style = 0, ;
		Name = "Check1"

	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 44, ;
		Left = 12, ;
		Height = 27, ;
		Width = 120, ;
		Caption = "Change tick color", ;
		Name = "Command2"

	PROCEDURE command2.Click
		thisform.check1.value=1

		xcolor=getcolor()
		if empty(xcolor)
		return .f.
		endi
		thisform.cls

		l=thisform.check1.left
		t=thisform.check1.top
		for i=l to l+17  &&just the checkbox square
		for j=t to t+17
		if between(thisform.point(i,j),9300000,11200000)  &&original windows xp SP3 tick color 
		thisform.forecolor=xcolor
		thisform.pset(i,j)
		endi
		endfor
		endfor
	ENDPROC
ENDDEFINE



Regards,
David

ENTIRE THREAD

Coloring / Highlighting Check Box Posted by David Mustakim @ 1/19/2014 4:00:31 PM
RE: Coloring / Highlighting Check Box Posted by Koen Piller @ 1/19/2014 4:50:39 PM
RE: Coloring / Highlighting Check Box Posted by David Mustakim @ 1/19/2014 4:56:44 PM
RE: Coloring / Highlighting Check Box Posted by Koen Piller @ 1/19/2014 5:22:04 PM
RE: Coloring / Highlighting Check Box Posted by David Mustakim @ 1/20/2014 8:43:37 AM
RE: Coloring / Highlighting Check Box Posted by Paul Gibson @ 1/20/2014 9:50:07 AM
RE: Coloring / Highlighting Check Box Posted by David Mustakim @ 1/20/2014 10:33:47 AM
RE: Coloring / Highlighting Check Box Posted by Paul Gibson @ 1/20/2014 11:26:02 AM
RE: Coloring / Highlighting Check Box Posted by David Mustakim @ 1/20/2014 11:41:24 AM
RE: Coloring / Highlighting Check Box Posted by Koen Piller @ 1/20/2014 2:50:25 PM
RE: Coloring / Highlighting Check Box Posted by Gene Wirchenko @ 1/20/2014 11:30:15 PM
RE: Coloring / Highlighting Check Box Posted by Vilhelm-Ion Praisach @ 1/21/2014 6:59:57 AM