Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOR EACH....Basic question
Message
De
06/05/1998 12:10:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/05/1998 11:51:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00097376
Message ID:
00097382
Vues:
23
>Hello everybody!
>This is first time I'm trying to use this.
>The reason is that I need to change color for each page in pageframe if any information is entered. So I need to go by each page, check each control and if value !empty gotta change color.
>
>This is my code with "something wrong" in there:
>
>FOR EACH Pages IN ThisForm.frame1.Pages
>Pages.FORECOLOR=RGB(0,0,0)
>FOR EACH objects IN ThisForm.frame1.Pages
> IF INLIST(UPPER(objects.BaseClass), "TEXTBOX", "EDITBOX")
> kukla = objects.Value
> IF !EMPTY(&kukla)
> Pages.ForeColor=RGB(0,0,0)
> ENDIF
> ENDIF
>NEXT
>NEXT
First change naming so conflict don't arise. Second you can't enumerate pages (but controls).
FOR EACH oPages IN ThisForm.frame1.Pages
	oPages.FORECOLOR=RGB(0,0,255)
	FOR EACH oObjects IN oPages.controls
		IF INLIST(UPPER(oObjects.BaseClass), "TEXTBOX", "EDITBOX")
		kukla = oObjects.Value
		IF !EMPTY(kukla)
			oPages.ForeColor=RGB(255,255,0)
		ENDIF
	ENDIF 
NEXT
NEXT
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform