Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 5 Monaten
Letzter Beitrag:
vor 3 Jahren, 5 Monaten
Beteiligte Autoren:
Peter Muckle, Fabrice Harari

WM 19 Android - update changes to background colour of edit control in Looper

Startbeitrag von Peter Muckle am 03.01.2015 18:14

Hi All,

I have a looper control with several read-only numeric edit controls, with numbers 1-5 available. Each edit control has a linked attribute.

I want to change the background colour depending on the value, using this code:


noth is int = WIN_Assessments.LOOP_QRY_Assessments.ATT_other

CASE 0: WIN_Assessments.LOOP_QRY_Assessments.InjuriesOrDisease..BrushColor= RGB(195, 195, 195)

CASE 1: WIN_Assessments.LOOP_QRY_Assessments.InjuriesOrDisease..BrushColor= RGB(34, 177, 76)

CASE 2: WIN_Assessments.LOOP_QRY_Assessments.InjuriesOrDisease..BrushColor= RGB(181, 230, 29)

CASE 3: WIN_Assessments.LOOP_QRY_Assessments.InjuriesOrDisease..BrushColor= RGB(255, 201, 14)

CASE 4: WIN_Assessments.LOOP_QRY_Assessments.InjuriesOrDisease..BrushColor= RGB(255, 127, 39)

CASE 5: WIN_Assessments.LOOP_QRY_Assessments.InjuriesOrDisease..BrushColor= RGB(237, 28, 36)

I put the reference to the procedure in the 'Display a row of LOOP_QRY_Assessments.InjuriesOrDisease. The colours change according to the values in the first record, but do not refresh for subsequent records - they are all the same as for the first record (although the values update). The Looper gets data from a Query.

Any comments or pointers welcome. I haven't used Loopers or developed for Android for long and don't understand some of the finer points.




Hi Peter

an attribute is linked to ONE property of a field...
so you need to create an attribute, link it to the brushcolor property of the field, then just do .......att_color=value

Just remember that EVERYTHING in loopers is an attribute, which means that direct access to anything else like a (..property), is forbidden

Best regards

von Fabrice Harari - am 03.01.2015 18:45
Thanks very much for your help Fabrice, that has solved my problem!

And I understand Loopers a bit better now as well.

Best wishes


von Peter Muckle - am 03.01.2015 19:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.