Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid's member class
Message
From
30/09/2003 17:14:07
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00833187
Message ID:
00833630
Views:
23
>>Hi All
>>
>>I have found something very strange. I have a member class setup of both columns and headers. I just tried changing the class column at run time and found the class that the class that I added was on the wrong column. In further investigation I found that the grid was adding a column 0 at run time. In the designer, column 1’s name is called acolumn1 and at run time, column 1’s name is acolumn0. The class that I changed is now showing up on column2 named acolumn1. Is this a bug or am I doing something wrong?
>>
>>
>>Thanks
>
>How are you adding your column at runtime? Let's see the code.

Here is the class.
DEFINE CLASS cColumn AS column 
	HeaderClass = "cheader"
	HeaderClassLibrary = "cgridclass.prg"
	cControlClass = "cgrid_textbox"
	cControlClassLib = "cgridcontrols.vcx"
	cControlName = ""
	PROCEDURE init()
		LOCAL lcControl
		IF NOT EMPTY(this.cControlClass) AND NOT EMPTY(this.cControlClassLib)
			IF EMPTY(this.cControlName)
				this.cControlName = this.cControlClass
			ENDIF 
			this.NewObject(this.cControlName,this.cControlClass,this.cControlClassLib)
			this.CurrentControl=this.cControlName
			DODEFAULT()
			FOR EACH loControl IN this.Controls 
				IF PEMSTATUS(loControl,"visible",5)
					loControl.visible = .t. 
				ENDIF 	
			NEXT 
		ENDIF 
	ENDPROC 
		
ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform