Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class does not do its job in 7.00 version
Message
From
17/11/2006 13:20:18
 
 
To
17/11/2006 13:12:19
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01170713
Message ID:
01170794
Views:
12
I was looking to see if the answer had been given. I hate posting the answer, when someone already did. :-)

>But instead of reading all the messages, why didn't you post it immediately :-) ?
>I just did the same things, it works
>thank you anyway :-)
>
>>I have read all of your other posts. I have used custom columns and headers since VFP 6 in my grids. My OrderHeader and OrderColumn both work fine. Here is a hint:
>>
>>
>>DEFINE CLASS Ric_Col AS Column
>>	PROCEDURE INIT
>>	DODEFAULT()
>>	THIS.REMOVEOBJECT("header1")
>>	THIS.ADDOBJECT("header1", "Myheadric")
>>	ENDPROC
>>
>>
>>In your code, you have two (2) header objects created. The default and the new one you created. The active one will probably be the first one in the list of headers. You need to kill the default header, and then create your new one. Enjoy!
>>
>>
>>By the way, header.Click() was available in VFP 6 as well.
>>
>>
>>>I have this class associated to a grid
>>>
>>>
>>>DEFINE CLASS Ric_Col AS Column
>>> 	backcolor = Rgb(192,192,192)
>>> 	fontsize = 8
>>>    ADD OBJECT 'header' AS Myheadric   && puoi utilizzare un Header personalizzato
>>>    ADD OBJECT 'text' AS Txtgrdric   && puoi utilizzare un textBox personalizzato
>>>  ENDDEFINE
>>>
>>>Define Class Myheadric as Header
>>>	alignment = 2
>>>	Ordine	     = .f.  && se vero l'ordine è impostato su questa colonna
>>>	Procedure Click
>>>		If !Empty(this.tag)
>>>			For each oCol in this.Parent.parent.objects
>>>				oCol.controls(1).NoOrder()
>>>			EndFor 	
>>>			this.OkOrder()
>>>		EndIf 	
>>>	EndProc
>>>		
>>>	Procedure OkOrder
>>>		If !this.ordine
>>>			this.ordine = .t.
>>>			Set Order To (this.tag)
>>>			this.Parent.parent.refresh()
>>>			this.BackColor = RGB(255,0,0)
>>>		EndIf
>>>	EndProc
>>>	
>>>	Procedure init
>>>		If Version(5) >= 900
>>>			themes  = .f.
>>>		EndIf 	
>>>
>>>	EndProc
>>>	
>>>	Procedure NoOrder
>>>		this.ordine = .f.
>>>		this.ResetToDefault('BackColor')
>>>	EndProc
>>>		
>>>EndDefine 				
>>>
>>>
>>>
>>>The problem is that I expected something to happen when I click on a header,
>>>but nothing happens while if I run it in VFP9 environment it does !
>>>Where is the problem ? I tried to put the themes property setting in the init event to avoid the processing of properties belonging to the new version but I still have the problem.
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform