Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class does not do its job in 7.00 version
Message
 
To
17/11/2006 10:53:20
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01170713
Message ID:
01170724
Views:
8
>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.


If there is no typo in your code, you just define a variable named themes in init event of the header class.
Procedure init
  If Version(5) >= 900
     this.Parent.Parent.themes  = .f. && Set Grid Themes to .f.
  EndIf
EndProc
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