Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamicbackcolor in a browse Command
Message
De
02/04/2009 07:48:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
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:
01392706
Vues:
57
>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

You can also use browse ... "when" to set it up but I would explicitly create a form with a grid.
Use employee
_Screen.AddProperty('MyBrowseSet',.F.)
Browse Fields ;
	First_Name :h="First Name of My Employee", ;
	Last_Name :h="Last Name of My Employee", ;
	Birth_Date :h="Happy Birthday" ;
	Name "myBrowse" ;
	Title 'My Employee Listing' ;
	When SetGrid(myBrowse)

Procedure SetGrid(toGrid)
	If !_Screen.MyBrowseSet
		With toGrid
			.DeleteMark = .F.
			.RecordMark = .F.
			.GridLines = 0
			.ScrollBars = 2
			.AllowRowSizing = .F.
			.Height = 400
			.Width = 600
			.SetAll("DynamicBackColor",;
				"iif(recno()%2=0,0xFFFF00,0x00FFFF)","column")
			.SetAll("WordWrap",.T.,"header")
			.HeaderHeight = .HeaderHeight * 3
			.SetAll("Width",100,"Column")
			*...
		Endwith
		_Screen.MyBrowseSet=.T.
	Endif
endproc
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform