Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamicbackcolor in a browse Command
Message
 
À
02/04/2009 05:52:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01392695
Message ID:
01392699
Vues:
49
Super Tore !

Thank

BHT

>The trick is to use two browse commands after each other. This is an example
>Use (_foxcode) Again && Or any other table
>DEFINE WINDOW FoxWindow FROM 10,10 SIZE 1,1 NAME FoxWindow 
>FoxWindow.top=50
>FoxWindow.left=50
>FoxWindow.WIDTH=550 
>FoxWindow.HEIGHT=500 
>FoxWindow.Caption='Test'
>Browse In Window FoxWindow Save Name FoxBrowse nowait
>#if .f.
>Public FoxBrowse as Grid && to enable intellisense
>#endif 
>FoxBrowse.left=0
>FoxBrowse.top=0
>FoxBrowse.width=FoxWindow.width
>FoxBrowse.height=FoxWindow.height
>FoxBrowse.HighlightStyle= 1
>FoxBrowse.HighlightBackColor=0x00ff00
>FoxBrowse.setall('DynamicBackColor', 'IIF(Mod(Recno(),2)=0,Rgb(255,255,255),Rgb(170,170,170))')
>FoxBrowse.AutoFit()
>Activate Window FoxWindow
>On Key Label Enter Keyboard '{esc}' Plain 
>Browse last
>On Key Label ENTER 
>Release Windows FoxBrowse
>Release Windows FoxWindow
>Messagebox('You picked record no.' + Transform(Recno()) + Chr(13)+Chr(10);
>+ 'field 1 is ' + Transform(Evaluate(Field(1))) + Chr(13)+Chr(10);
>+ 'field 2 is ' + Transform(Evaluate(Field(2))))
>
>>Hi all,
>>
>>I want to have a dynamicbackcolor in a browse Command.
>>
>>it's possible ?
>>
>>
>>#DEFINE ROUGE_LOC    	RGB(255,0,0)
>>#DEFINE BRUN_CL_LOC    	RGB(255,128,0)
>>
>>
>>CREATE CURSOR Temp ( Name c(20) , nPrice N(8,4) )
>>INSERT INTO Temp "DUPONT jean" , 14 
>>
>>
>>Brows Field Name , nPrice:IIF(  BETW( nPrice , 1 , 9 ) , ROUGE_LOC     ,  BRUN_CL_LOC     )
>>
>>
>>
>>
>>Thank in advance
>>
>>BHT
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform