Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One of those SetAll problems
Message
From
03/10/2005 06:53:02
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01055445
Message ID:
01055452
Views:
14
This message has been marked as the solution to the initial question of the thread.
This works for me:
PUBLIC obaseform1
obaseform1=NEWOBJECT("baseform1")
obaseform1.Show
RETURN


	**************************************************
*-- Form:         baseform1 (d:\all_zapl\test.scx)
*-- ParentClass:  baseform (d:\komisionni\lib\mc_win95.vcx)
*-- BaseClass:    form
*-- Time Stamp:   10/03/05 01:50:03 PM
*
DEFINE CLASS baseform1 AS Form


	Top = 0
	Left = 0
	Height = 657
	Width = 606
	DoCreate = .T.
	Name = "Baseform1"


	ADD OBJECT grid1 AS grid WITH ;
		Height = 200, ;
		Left = 20, ;
		Top = 226, ;
		Width = 483, ;
		Name = "Grid1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 56, ;
		Left = 113, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Push me", ;
		Name = "Command1"


	PROCEDURE Load
		CREATE CURSOR cTest (test1 C(10), Test2 N(5))
		FOR asd= 1 TO 10
		    INSERT INTO cTest VALUES ("aaaa "+TRANSFORM(asd),asd)
		NEXT
		GO TOP
	ENDPROC


	PROCEDURE command1.Click
		RAND(-1)
		m1 = INT((RAND()*1000)+1) % 10
	thisform.Grid1.SetAll("DynamicBackColor",[IIF(RECNO()==]+TRANSFORM(m1)+[,RGB(255,255,255),RGB(0,0,0))],"Column")
		thisform.Grid1.Refresh()
	ENDPROC


ENDDEFINE
*
*-- EndDefine: baseform1
**************************************************
Just keep push the button :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform