Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to insert checkbox in the header?
Message
 
 
À
17/02/2009 16:28:44
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01382434
Message ID:
01382497
Vues:
68
Hi Joel,

Thanks again for your class.

I use VFP9 SP1 and our menu is complicated, so I can not just change it. I added the class on the fly to the grid's column instead of using HeaderClass. Gotcha - for some reason Header1 didn't work, but Header2 worked.

Another little adjustment - in the Header.Click event I reset MousePointer to default (otherwise it stays hourglasses - seems to be strange VFP bug).


>>>Works perfectly with small problem.
>>>Can't find Function GoRec
>
>Oops! I didn't realize I used that function. I will fix it on my blog, but the function is below.
>
>>I tried to use HeaderClass for the column, but then I got an error when I tried to run the form.
>
>This VFP9 SP2 bug may apply to you: If you open this form from the menu, you have to use the menu “Procedure” to open the form instead of “Command”. Otherwise, VFP9 will crash when you open the form.
>
>
>* GOREC.prg
>* Restore record number
>* lcAlias is optional
>* lcFailCode is optional, indicates where to go (TOP,BOTTOM) if record number can't be restored)
>Lparameters lnRecNo, lcAlias, lcFailCode
>Local llEof
>
>If Empty(lcAlias)
>	lcAlias = Alias()
>EndIf
>
>If lnRecNo>Reccount(lcAlias)
>	llEof = .t.
>EndIf
>
>If lnRecNo<>0 and lnRecNo<=Reccount(lcAlias)
>	Go lnRecNo in (lcAlias)
>Else
>	DO case 
>	Case llEof	&& restore at end of file
>		Go Bottom in (lcAlias)
>		If !Eof(lcAlias)
>			Skip in (lcAlias)
>		Endif
>	Case Empty(lcFailCode)
>		* Record pointer stays put
>	Case Upper(lcFailCode) = "T"	&& Top
>		Go Top in (lcAlias)
>	Case Upper(lcFailCode) = "B"	&& Bottom
>		Go Bottom in (lcAlias)
>	Otherwise
>		* Record pointer stays put
>	EndCase
>EndIf
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform