FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
WDM22 - Change Color In Looper
WDM22 - Change Color In Looper
Débuté par André Labuschagné, 25 aoû. 2018 21:27 - 3 réponses
Connectez-vous…
André Labuschagné
#1
Posté le 25 août 2018 - 21:27
Hi All
I am needing to change the colour of a control in a looper based on a condition. Here is the code I have tried:
TheMax is int = LOOP_MyLooper..Occurrence
FOR Rec = 1 TO TheMax
IF LOOP_MyLooper.ATT_MyStatus[Rec]..Value = "MyCondition" THEN
LOOP_MyLooper.ATT_MyStatusColor[Rec]..Color = DarkGreen
END
END
Attribute MyStatus is set to Value
Attribute MyStatusColor is set to Color
Any ideas what I am doing wrong?
Cheers
André
Signaler
0
0
Peter Muckle
#2
Posté le 25 août 2018 - 21:41
Hi,
IF LOOP_MyLooper.ATT_MyStatus[Rec]..Value = "MyCondition" THEN
LOOP_MyLooper.ATT_MyStatusColor[Rec]..Color = DarkGreen
END
Should this be
IF LOOP_MyLooper.ATT_MyStatus[Rec]..Value = "MyCondition" THEN
LOOP_MyLooper.ATT_MyStatusColor[Rec]..Color = DarkGreen
END
Signaler
0
0
Fabrice Harari
#3
Posté le 26 août 2018 - 00:29
Hi André,
to complete Peter's message
An attribute is NOT a control where you can use properties.
An attribute is linked to ONE SPECIFIC property of a control.
So you need ot create an attribute linked to the color
Best regards
Signaler
0
0
André Labuschagné
#4
Posté le 26 août 2018 - 23:51
Howdy
Thanks Peter - understood.
Thanks Fabrice - understood - you will notice that I have an attribute linked to the color property of the control but was addressing it incorrectly as per Peter's post.
Still learning here - phew - so much to still understand.
Cheers
André
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte